aboutsummaryrefslogtreecommitdiff
path: root/misc/gopod
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2005-10-25 18:35:20 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2005-10-25 18:35:20 +0000
commitca73b375cdbf1e32af052b2c5b8ec8b05b11fe81 (patch)
tree36f19f15c67245f7966b2a111bc988f87ac8f6aa /misc/gopod
parent8a1ab6255da2dbc226755f54208f023748f3d3bc (diff)
downloadports-ca73b375cdbf1e32af052b2c5b8ec8b05b11fe81.tar.gz
ports-ca73b375cdbf1e32af052b2c5b8ec8b05b11fe81.zip
Notes
Diffstat (limited to 'misc/gopod')
-rw-r--r--misc/gopod/Makefile72
-rw-r--r--misc/gopod/distinfo4
-rw-r--r--misc/gopod/files/extra-patch-main.c19
-rw-r--r--misc/gopod/files/patch-main.c32
4 files changed, 51 insertions, 76 deletions
diff --git a/misc/gopod/Makefile b/misc/gopod/Makefile
index 6272afeb45f2..920159a31d37 100644
--- a/misc/gopod/Makefile
+++ b/misc/gopod/Makefile
@@ -1,71 +1,59 @@
-# New ports collection makefile for: gopod
-# Date created: 4 April 2005
-# Whom: Emanuel Haupt <ehaupt@critical.ch>
+# New ports collection makefile for: gopod
+# Date created: 4 April 2005
+# Whom: Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#
PORTNAME= gopod
-PORTVERSION= 1.1
+PORTVERSION= 1.3
CATEGORIES= misc
-MASTER_SITES= http://critical.ch/distfiles/
+MASTER_SITES= http://gopod.free-go.net/gopod/ \
+ http://critical.ch/distfiles/
+PKGNAMEPREFIX?=
DISTNAME= goPod-${PORTVERSION}_linux_bsd
MAINTAINER= ehaupt@FreeBSD.org
-COMMENT= Utility to cap/uncap an iPod
+COMMENT?= Utility to cap/uncap an iPod
-GNU_CONFIGURE= yes
+HAS_CONFIGURE= yes
USE_GMAKE= yes
-RESTRICTED= Unclear legal status in EU countries
+USE_REINPLACE= yes
-PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}/gtk-version
+RESTRICTED= Unclear legal status in EU countries
+.if ${PKGNAMEPREFIX} == ""
PLIST_FILES= bin/gopod
-
-.if defined(WITH_GUI)
-USE_X_PREFIX= yes
-USE_GNOME= gtk20
-WRKSRC= ${WRKDIR}/${DISTNAME}/gtk-version
-PLIST_FILES+= share/${PORTNAME}/capped.png \
- share/${PORTNAME}/go.png \
- share/${PORTNAME}/go_.png \
- share/${PORTNAME}/mask.xpm \
- share/${PORTNAME}/notdetected.png \
- share/${PORTNAME}/uncapped.png
-PLIST_DIRS+= share/${PORTNAME}
-.else
WRKSRC= ${WRKDIR}/${DISTNAME}/console-version
.endif
-pre-everything::
-.if !defined(WITH_GUI)
- @${ECHO_MSG}
- @${ECHO_MSG} "You may define WITH_GUI if you want the gui version"
- @${ECHO_MSG}
-.endif
+PORTDOCS= README_EN README_FR
post-patch:
- @${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
- ${WRKSRC}/main.c > ${WRKSRC}/main.c.freebsd
- ${MV} ${WRKSRC}/main.c.freebsd ${WRKSRC}/main.c
+.if ${PKGNAMEPREFIX} == "gtk-"
+ @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/main.c
+.endif
+ @${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' ${WRKSRC}/main.c
+ @${REINPLACE_CMD} -e 's|\($$(CC)\)|\1 ${CFLAGS}|; /strip/d' \
+ ${WRKSRC}/Makefile
do-install:
-.if defined(WITH_GUI)
- @${MKDIR} ${PREFIX}/share/${PORTNAME}
-.for file in capped.png go.png go_.png mask.xpm notdetected.png uncapped.png
- ${INSTALL_DATA} -m 0644 ${WRKSRC}/gfx/${file} ${PREFIX}/share/${PORTNAME}/${file}
-.endfor
+.if ${PKGNAMEPREFIX} == ""
${INSTALL_PROGRAM} -m 0110 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
.else
- ${INSTALL_PROGRAM} -m 0110 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ @${MKDIR} ${DATADIR}
+.for f in ${DATAFILES}
+ ${INSTALL_DATA} ${WRKSRC}/gfx/${f} ${DATADIR}
+.endfor
+ ${INSTALL_PROGRAM} -m 0110 ${WRKSRC}/${PORTNAME} \
+ ${PREFIX}/bin/${UNIQUENAME}
.endif
.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README_EN ${WRKSRC}/README_FR ${DOCSDIR}
-PLIST_FILES+= share/doc/${PORTNAME}/README_EN \
- share/doc/${PORTNAME}/README_FR
-PLIST_DIRS+= share/doc/${PORTNAME}
+ @${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
.endif
post-install:
diff --git a/misc/gopod/distinfo b/misc/gopod/distinfo
index 7e2058baabb8..868b1985d66e 100644
--- a/misc/gopod/distinfo
+++ b/misc/gopod/distinfo
@@ -1,2 +1,2 @@
-MD5 (goPod-1.1_linux_bsd.tar.gz) = 569be8629845cd6f027b802d1e909841
-SIZE (goPod-1.1_linux_bsd.tar.gz) = 98330
+MD5 (goPod-1.3_linux_bsd.tar.gz) = 2b1878b09524d2efebf3c59b8b7434a3
+SIZE (goPod-1.3_linux_bsd.tar.gz) = 91614
diff --git a/misc/gopod/files/extra-patch-main.c b/misc/gopod/files/extra-patch-main.c
new file mode 100644
index 000000000000..08551e8910bd
--- /dev/null
+++ b/misc/gopod/files/extra-patch-main.c
@@ -0,0 +1,19 @@
+--- main.c.orig Tue Oct 25 10:57:30 2005
++++ main.c Tue Oct 25 10:59:23 2005
+@@ -5,11 +5,11 @@
+ #include <gtk/gtk.h>
+ #include "gfx/mask.xpm"
+
+-#define GFX_GO "gfx/go.png"
+-#define GFX_GO_ "gfx/go_.png"
+-#define GFX_NOTDETECTED "gfx/notdetected.png"
+-#define GFX_CAPPED "gfx/capped.png"
+-#define GFX_UNCAPPED "gfx/uncapped.png"
++#define GFX_GO "%%DATADIR%%/go.png"
++#define GFX_GO_ "%%DATADIR%%/go_.png"
++#define GFX_NOTDETECTED "%%DATADIR%%/notdetected.png"
++#define GFX_CAPPED "%%DATADIR%%/capped.png"
++#define GFX_UNCAPPED "%%DATADIR%%/uncapped.png"
+
+ #if defined(__LINUX__)
+ #define DEV "/dev/sd%c"
diff --git a/misc/gopod/files/patch-main.c b/misc/gopod/files/patch-main.c
deleted file mode 100644
index 8bc6081aeb18..000000000000
--- a/misc/gopod/files/patch-main.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- main.c.orig Wed Nov 3 19:43:23 2004
-+++ main.c Mon Apr 4 10:05:06 2005
-@@ -16,11 +16,11 @@
- #include <gtk/gtk.h>
- #include "gfx/mask.xpm"
-
--#define GFX_GO "gfx/go.png"
--#define GFX_GO_ "gfx/go_.png"
--#define GFX_NOTDETECTED "gfx/notdetected.png"
--#define GFX_CAPPED "gfx/capped.png"
--#define GFX_UNCAPPED "gfx/uncapped.png"
-+#define GFX_GO "%%PREFIX%%/share/gopod/go.png"
-+#define GFX_GO_ "%%PREFIX%%/share/gopod/go_.png"
-+#define GFX_NOTDETECTED "%%PREFIX%%/share/gopod/notdetected.png"
-+#define GFX_CAPPED "%%PREFIX%%/share/gopod/capped.png"
-+#define GFX_UNCAPPED "%%PREFIX%%/share/gopod/uncapped.png"
-
- #if defined(__LINUX__)
- #define DEV "/dev/sd%c"
-@@ -69,10 +69,10 @@
- {
- char x;
-
-- for (x = START; x <= END; x++)
-+ for (x = 0; x <= 15; x++)
- {
- char devstring[8];
-- sprintf(devstring, DEV, x);
-+ sprintf(devstring, "/dev/da%i", x);
- dev = open(devstring, O_RDWR);
- lseek(dev, FIRMWARE_START, SEEK_CUR);
- read(dev, buffer, BLOCK_SIZE);