update to 2.7, change options to the new format,

and sort options-handling
This commit is contained in:
Brendan Fabeny 2012-06-27 07:27:07 +00:00
parent c2757145db
commit 56faf06df7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300071
4 changed files with 43 additions and 67 deletions

View file

@ -6,13 +6,12 @@
#
PORTNAME= links
DISTVERSION= 2.6
PORTREVISION= 1
DISTVERSION= 2.7
PORTEPOCH= 1
CATEGORIES?= www
CATEGORIES= www ipv6
MASTER_SITES= http://links.twibright.com/download/ LOCAL/bf
MAINTAINER?= bf@FreeBSD.org
MAINTAINER= bf@FreeBSD.org
COMMENT= Lynx-like text WWW browser
LICENSE= GPLv2
@ -21,19 +20,25 @@ CONFLICTS= links-0* links-hacked-[0-9]*
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-ssl --without-pmshell --without-atheos \
--without-gpm --without-fb
--without-gpm --without-fb --without-windows
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_OPENSSL= yes
USE_BZIP2= yes
OPTIONS= SVGALIB "non-X11 graphics support" off \
DIRECTFB "directfb driver support" off \
IPV6 "IPv6 support" off \
X11 "X11 graphics support" on \
UTF8 "With UTF-8 support" on \
TRANS "Hack for background transparency" off
OPTIONS_DEFINE= DIRECTFB SVGALIB TRANS UTF8 X11
DIRECTFB_DESC= DirectFB graphics support
SVGALIB_DESC= SVGALib graphics support
TRANS_DESC= Hack for background transparency
UTF8_DESC= UTF-8 support
X11_DESC= X11 graphics support
OPTIONS_DEFAULT= UTF8 X11
MAN1= links.1
PLIST_FILES= bin/links
.include <bsd.port.options.mk>
@ -41,7 +46,7 @@ OPTIONS= SVGALIB "non-X11 graphics support" off \
LIB_DEPENDS+= lzma:${PORTSDIR}/archivers/xz
.endif
.ifdef(WITH_SVGALIB) || defined(WITH_X11) || defined(WITH_DIRECTFB)
.if ${PORT_OPTIONS:MDIRECTFB} || ${PORT_OPTIONS:MSVGALIB} || ${PORT_OPTIONS:MX11}
LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png \
jpeg:${PORTSDIR}/graphics/jpeg \
tiff:${PORTSDIR}/graphics/tiff
@ -50,29 +55,31 @@ CONFIGURE_ARGS+= --enable-graphics
CONFIGURE_ARGS+= --disable-graphics --without-libjpeg --without-libtiff
.endif
.ifdef(WITH_SVGALIB)
LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+= --with-svgalib
.else
CONFIGURE_ARGS+= --without-svgalib
.endif
.ifdef(WITH_DIRECTFB)
.if ${PORT_OPTIONS:MDIRECTFB}
LIB_DEPENDS+= directfb-1.4.5:${PORTSDIR}/devel/directfb
CONFIGURE_ARGS+= --with-directfb
.else
CONFIGURE_ARGS+= --without-directfb
.endif
.if defined(WITH_IPV6) || make(makesum)
USE_AUTOTOOLS+= autoconf
PATCH_SITES+= http://xpisar.wz.cz/links-ipv6/:ipv6 \
${MASTER_SITE_LOCAL:S|%SUBDIR%|bf|:S|$|:ipv6|}
PATCHFILES+= links-2.6-ipv6.patch.gz:ipv6
PATCH_DIST_STRIP= -p1
.if ${PORT_OPTIONS:MSVGALIB}
LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+= --with-svgalib
.else
CONFIGURE_ARGS+= --without-svgalib
.endif
.if !defined(WITHOUT_X11)
.if ${PORT_OPTIONS:MTRANS}
EXTRA_PATCHES+= ${FILESDIR}/extra-terminal.c.diff
.endif
.if ${PORT_OPTIONS:MUTF8}
CONFIGURE_ARGS+= --enable-utf8
.else
CONFIGURE_ARGS+= --disable-utf8
.endif
.if ${PORT_OPTIONS:MX11}
USE_XORG= x11 xproto
CONFIGURE_ARGS+= --with-x
DESKTOP_ENTRIES="links" \
@ -86,23 +93,10 @@ PLIST_FILES+= share/pixmaps/links.xpm
CONFIGURE_ARGS+= --without-x
.endif
.if defined(WITHOUT_UTF8)
CONFIGURE_ARGS+= --disable-utf8
.endif
.if defined(WITH_TRANS)
EXTRA_PATCHES+= ${FILESDIR}/extra-terminal.c.diff
.endif
MAN1= links.1
PLIST_FILES+= bin/links
post-patch:
@${REINPLACE_CMD} -e "s!/etc/!${PREFIX}/etc/!" ${WRKSRC}/os_dep.h
#replace a deprecated indirect selection with png_jumpbuf()
@${REINPLACE_CMD} -e 's!png_ptr->jmpbuf!png_jmpbuf(png_ptr)!' ${WRKSRC}/png.c
.if !defined(WITHOUT_X11)
.if ${PORT_OPTIONS:MX11}
post-install:
@${INSTALL_DATA} ${WRKSRC}/graphics/links.xpm ${PREFIX}/share/pixmaps/links.xpm
.endif

View file

@ -1,4 +1,2 @@
SHA256 (links-2.6.tar.bz2) = df9149f5f50d0b7742f6b3972b0fc0e9ff091ad4ef27153a3362a9ac1033835b
SIZE (links-2.6.tar.bz2) = 3866614
SHA256 (links-2.6-ipv6.patch.gz) = 0e20b756a068e050411bc2e0e76c4b76e00443d2cdcaa92f1994e8eabee15ca8
SIZE (links-2.6-ipv6.patch.gz) = 9709
SHA256 (links-2.7.tar.bz2) = 0c182b1cbcdfd5cdcd2f75a6032d1a4b660d07c1225c1e07757cec81d3302130
SIZE (links-2.7.tar.bz2) = 3884511

View file

@ -1,16 +0,0 @@
--- configure.in.orig 2011-11-21 12:07:21.000000000 -0500
+++ configure.in 2011-12-19 05:54:11.000000000 -0500
@@ -126,7 +126,12 @@
AC_CHECK_HEADERS(sigaction.h)
AC_CHECK_HEADERS(netinet/in_systm.h)
AC_CHECK_HEADERS(netinet/in_system.h)
-AC_CHECK_HEADERS(netinet/ip.h)
+AC_CHECK_HEADERS([netinet/ip.h],[],[],[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+])
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(netinet/dhcp.h)
AC_CHECK_HEADERS(net/socket.h)

View file

@ -1,12 +1,12 @@
--- types.c.orig 2008-03-19 18:18:18.614955994 -0400
+++ types.c 2008-03-19 18:21:18.345245179 -0400
@@ -820,7 +820,8 @@
--- types.c.orig 2012-06-06 15:49:37.000000000 -0400
+++ types.c 2012-06-27 02:28:56.000000000 -0400
@@ -841,7 +841,8 @@
ext = NULL;
}
if (ext) while (ext[extl] && ext[extl] != '.' && !dir_sep(ext[extl]) && !end_of_dir(url, ext[extl])) extl++;
- if ((extl == 3 && !casecmp(ext, "htm", 3)) ||
- if ((extl == 3 && !casecmp(ext, cast_uchar "htm", 3)) ||
+ if (force_html ||
+ (extl == 3 && !casecmp(ext, "htm", 3)) ||
(extl == 4 && !casecmp(ext, "html", 4))) return stracpy("text/html");
+ (extl == 3 && !casecmp(ext, cast_uchar "htm", 3)) ||
(extl == 4 && !casecmp(ext, cast_uchar "html", 4))) return stracpy(cast_uchar "text/html");
foreach(e, extensions) {
unsigned char *fname = NULL;