summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-ftp/linksys-tftp')
-rw-r--r--net-ftp/linksys-tftp/Manifest1
-rw-r--r--net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch28
-rw-r--r--net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch20
-rw-r--r--net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild29
-rw-r--r--net-ftp/linksys-tftp/metadata.xml6
5 files changed, 84 insertions, 0 deletions
diff --git a/net-ftp/linksys-tftp/Manifest b/net-ftp/linksys-tftp/Manifest
new file mode 100644
index 000000000000..ea127ed13354
--- /dev/null
+++ b/net-ftp/linksys-tftp/Manifest
@@ -0,0 +1 @@
+DIST linksys-tftp-1.2.1.tar.bz2 11124 SHA256 872e9e58d0673d14ca00edfc1d2680a77c9737ba5a4654540182e5e5ffc7f16f SHA512 7d99cd7cc2144396fe008ed0fbc21053ef4e614021d6d2e24adca799d8eabd1b3c177b4bee20e14034170bc234d36e9eeaaf8e825513ef6f37e73643b91667fc WHIRLPOOL 52823f9dde9b4069b4ff6e0c742fcad8651e3206b4145e909a950dc5e24dbebbb393827e84a317b5a445e26f24f0245df11fee35cfc623964da7f23029cb4bf3
diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch
new file mode 100644
index 000000000000..b374e808ece2
--- /dev/null
+++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch
@@ -0,0 +1,28 @@
+Fix LDFLAGS (bug http://bugs.gentoo.org/336956 ) and
+CFLAGS (bug http://bugs.gentoo.org/240894 ) by
+Michael Weber <xmw@gentoo.org>
+
+--- linksys-tftp-1.2.1/Makefile
++++ linksys-tftp-1.2.1/Makefile
+@@ -19,18 +19,18 @@
+ # We override /usr/include/arpa/tftp.h with our own because
+ # we want tu_block to be unsigned short, not short as on most platforms
+ #
+-CFLAGS= -I. -O2 -Dsin=sin_x
++CFLAGS += -I. -Dsin=sin_x
+ #DEBUG
+ # CFLAGS= -I. -Wall -ggdb -Dsin=sin_x
+ SRCS= main.c tftp.c tftpsubs.c
+ OBJS= main.o tftp.o tftpsubs.o
+ DOBJS= tftpsubs.o
+-CC= gcc
++CC?= gcc
+
+ all: linksys-tftp
+
+ linksys-tftp: ${OBJS}
+- ${CC} -o $@ ${CFLAGS} ${OBJS}
++ ${CC} -o $@ ${CFLAGS} ${OBJS} ${LDFLAGS}
+
+ clean:
+ rm -f ${OBJS} ${DOBJS} *core linksys-tftp
diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
new file mode 100644
index 000000000000..386cf7b1e210
--- /dev/null
+++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
@@ -0,0 +1,20 @@
+--- linksys-tftp-1.2.1/main.c
++++ linksys-tftp-1.2.1/main.c
+@@ -40,6 +40,8 @@
+ #include <setjmp.h>
+ #include <ctype.h>
+ #include <netdb.h>
++#include <stdlib.h>
++#include <strings.h>
+
+ #define TIMEOUT 5 /* secs between rexmt's */
+
+@@ -110,7 +112,7 @@
+ char *index();
+ char *rindex();
+
+-main(argc, argv)
++int main(argc, argv)
+ char *argv[];
+ {
+ struct sockaddr_in sin;
diff --git a/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
new file mode 100644
index 000000000000..7f305c1ae07d
--- /dev/null
+++ b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TFTP client suitable for uploading to the Linksys WRT54G Wireless Router"
+HOMEPAGE="http://redsand.net/projects/linksys-tftp/linksys-tftp.php"
+SRC_URI="http://redsand.net/projects/${PN}/pub/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-r1-Makefile.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin linksys-tftp
+ dodoc README
+}
diff --git a/net-ftp/linksys-tftp/metadata.xml b/net-ftp/linksys-tftp/metadata.xml
new file mode 100644
index 000000000000..4ef473d6087e
--- /dev/null
+++ b/net-ftp/linksys-tftp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <longdescription>An extended version of BSD tftp with passwords</longdescription>
+</pkgmetadata>