aboutsummaryrefslogtreecommitdiff
path: root/ftp/jigdo
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/jigdo')
-rw-r--r--ftp/jigdo/Makefile8
-rw-r--r--ftp/jigdo/files/extra-glibc-getopt.h23
2 files changed, 30 insertions, 1 deletions
diff --git a/ftp/jigdo/Makefile b/ftp/jigdo/Makefile
index 36bd0698e5a4..48d2f497a34f 100644
--- a/ftp/jigdo/Makefile
+++ b/ftp/jigdo/Makefile
@@ -38,10 +38,16 @@ pre-fetch:
#post-patch:
# @${REINPLACE_CMD} -e "s/gtk-config/${GTK_CONFIG}/g" ${WRKSRC}/configure
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 500041
+EXTRA_PATCHES= ${FILESDIR}/extra-glibc-getopt.h
+.endif
+
post-install:
@${STRIP_CMD} ${PREFIX}/bin/jigdo-file
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/ftp/jigdo/files/extra-glibc-getopt.h b/ftp/jigdo/files/extra-glibc-getopt.h
new file mode 100644
index 000000000000..300584ba0825
--- /dev/null
+++ b/ftp/jigdo/files/extra-glibc-getopt.h
@@ -0,0 +1,23 @@
+--- src/glibc-getopt.h.orig Fri Dec 6 08:24:36 2002
++++ src/glibc-getopt.h Fri Dec 6 08:29:58 2002
+@@ -37,12 +37,11 @@
+ # define ELIDE_CODE
+ # endif
+ #endif
++#define ELIDE_CODE
+ #ifndef ELIDE_CODE
+ # define opterr my_opterr
+ # define optind my_optind
+ # define optopt my_optopt
+-#endif
+-
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -186,5 +185,6 @@
+
+ /* Make sure we later can get all the definitions and declarations. */
+ #undef __need_getopt
++#endif /* ELIDE_CODE */
+
+ #endif /* getopt.h */