- Update to 7.4.43

- Make the port respect PTHREAD_{CFLAGS,LIB}
- OPTIONSify the port
- Remove the dependency of nasm that make bad x86 code on amd64 ia64 plateforms
  and that make suspicious code (maybe code that can be exploited)

PR:		ports/63184
Submitted by:	maintainer
This commit is contained in:
Vanilla I. Shu 2004-02-25 07:01:48 +00:00
parent 46bf369b65
commit 3bfa455c5e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102033
6 changed files with 114 additions and 117 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= pike74
PORTVERSION= 7.4.31
PORTREVISION= 2
PORTVERSION= 7.4.43
CATEGORIES= lang
MASTER_SITES= ftp://pike.ida.liu.se/pub/pike/all/${PORTVERSION}/ \
ftp://ftp.oav.net/pkg_freebsd/distfiles/ \
@ -21,15 +20,16 @@ DISTNAME= Pike-v${PORTVERSION}
MAINTAINER= kiwi@oav.net
COMMENT= A dynamic programming language with a syntax similar to C++
BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison/
.if (${MACHINE} == "i386")
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm/
.endif
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff \
gdbm.3:${PORTSDIR}/databases/gdbm \
fftw.2:${PORTSDIR}/math/fftw
OPTIONS= TTF "Add FreeType 1 support" on \
FREETYPE "Add FreeType 2 support" on \
OPT_CFLAGS "Enable additional compilation optimizations" on \
MYSQL "Add MySQL support" on
MAN1= pike.1
WRKSRC= ${WRKDIR}/${DISTNAME}/src/
@ -37,7 +37,7 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/src/
WANT_MESA= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS+=${PTHREAD_LIBS} CPPFLAGS+=${PTHREAD_CFLAGS}
CONFIGURE_ARGS+= --without-debug \
--with-double-precision \
--with-long-double-precision \
@ -53,7 +53,7 @@ CONFIGURE_ARGS+= --without-debug \
--with-zlib \
--with-threads \
--with-readline \
--with-jpeg=${PREFIX} \
--with-jpeg \
--with-tiff \
--with-gdbm \
--without-java \
@ -66,13 +66,11 @@ CONFIGURE_ARGS+= --without-debug \
--prefix=${PREFIX}
USE_REINPLACE= yes
USE_GETTEXT= yes
USE_BISON= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502102
FORBIDDEN= "Does not respect PTHREAD_{CFLAGS,LIBS}"
.endif
PLIST_SUB+= PORTVERSION=${PORTVERSION}
# FreeBSD 5.0 Needs to have libgmp port to support gmp.
@ -90,6 +88,9 @@ CONFIGURE_ARGS+= --without-perl
.if exists(${LOCALBASE}/lib/libavcodec.so.0)
WITH_FFMPEG= yes
OPTIONS+= FFMPEG "Add FFmpeg support" on
.else
OPTIONS+= FFMPEG "Add FFmpeg support" off
.endif
.if exists(${LOCALBASE}/lib/libttf.so.4)
@ -100,32 +101,32 @@ WITH_TTF= yes
WITH_FREETYPE= yes
.endif
.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10)
WITH_MYSQL= yes
.endif
.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.12)
WITH_MYSQL40= yes
.endif
.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14)
WITH_MYSQL41= yes
.endif
.if exists(${LOCALBASE}/lib/libpq.so.3)
WITH_POSTGRES= yes
OPTIONS+= POSTGRES "Add Postgres SQL support" on
.else
OPTIONS+= POSTGRES "Add Postgres SQL support" off
.endif
.if exists(${LOCALBASE}/lib/libodbc.so.1)
WITH_UNIXODBC= yes
OPTIONS+= UNIXODBC "Add UnixODBC support (incompatible with IODBC)" on
.else
OPTIONS+= UNIXODBC "Add UnixODBC support (incompatible with IODBC)" off
.endif
.if exists(${LOCALBASE}/lib/libiodbc.so.2)
WITH_IODBC= yes
OPTIONS+= IODBC "Add iODBC support (incompatible with UnixODBC)" on
.else
OPTIONS+= IODBC "Add iODBC support (incompatible with UnixODBC)" off
.endif
.if exists(${LOCALBASE}/lib/libsane.so.1)
WITH_SANE= yes
OPTIONS+= SANE "Add SANE support" on
.else
OPTIONS+= SANE "Add SANE support" off
.endif
.if exists(${LOCALBASE}/lib/libgtkgl.so.5)
@ -134,19 +135,23 @@ WITH_MESA= yes
.if exists(${LOCALBASE}/lib/libpdf.so.6) || exists(${LOCALBASE}/lib/libpanda.so.0)
WITH_PDF= yes
OPTIONS+= PDF "Add PDF support" on
.else
OPTIONS+= PDF "Add PDF support" off
.endif
.if exists(${LOCALBASE}/lib/librsvg-2.so.2)
WITH_SVG2= yes
OPTIONS+= SVG2 "Add SVG2 support" on
.else
OPTIONS+= SVG2 "Add SVG2 support" off
.endif
.if exists(${LOCALBASE}/lib/libct.so.1)
WITH_TDS= yes
.endif
.if defined(WITH_MOST)
WITH_TTF= yes
WITH_FREETYPE= yes
OPTIONS+= TDS "Add FreeTDS (Sybase and MSSQL) support" on
.else
OPTIONS+= TDS "Add FreeTDS (Sybase and MSSQL) support" off
.endif
.if defined(WITHOUT_RELOCATABLE_DUMPED_MODULES)
@ -166,7 +171,7 @@ CONFIGURE_ARGS+= --with-computed-goto \
--with-new-multisets
.endif
.if defined(WITH_OPTIMIZED_CFLAGS)
.if defined(WITH_OPT_CFLAGS)
.if (${MACHINE} == "i386")
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
.else
@ -196,28 +201,14 @@ CONFIGURE_ARGS+= --without-freetype
.endif
.if defined(WITH_MYSQL)
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
.else
CONFIGURE_ARGS+= --without-mysql
.endif
.if defined(WITH_MYSQL40)
LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
.else
CONFIGURE_ARGS+= --without-mysql
.endif
.if defined(WITH_MYSQL41)
LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
.else
CONFIGURE_ARGS+= --without-mysql
.endif
.if defined(WITH_POSTGRES)
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7-client
CONFIGURE_ARGS+= --with-pgsql=${PREFIX}
.else
CONFIGURE_ARGS+= --without-pgsql
@ -283,82 +274,18 @@ CONFIGURE_ARGS+= --with-GL --with-GLUT
CONFIGURE_ARGS+= --without-GL --without-GLUT
.endif
#.if (${MACHINE} == "i386")
#CONFIGURE_ARGS+= --with-poll
#.else
## Alpha seems to have problems with poll() with pike... :/
#CONFIGURE_ARGS+= --without-poll
#.endif
USE_GMAKE= yes
pre-everything::
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${ECHO_MSG} "You can enable additional compilation optimizations"
@${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS"
.endif
.if !defined(WITH_FFMPEG)
@${ECHO_MSG} "You can enable FFmpeg support by defining WITH_FFMPEG."
.endif
.if !defined(WITH_TTF) && !defined(WITH_MOST)
@${ECHO_MSG} "You can enable _Image_TTF support by defining WITH_TTF."
.endif
.if !defined(WITH_FREETYPE) && !defined(WITH_MOST)
@${ECHO_MSG} "You can enable _Image_FreeType support by defining WITH_FREETYPE."
.endif
.if !defined(WITH_MYSQL)
@${ECHO_MSG} "You can enable MySQL 3.23 support by defining WITH_MYSQL."
.endif
.if !defined(WITH_MYSQL40)
@${ECHO_MSG} "You can enable MySQL 4.0 support by defining WITH_MYSQL40."
.endif
.if !defined(WITH_MYSQL41)
@${ECHO_MSG} "You can enable MySQL 4.1 support by defining WITH_MYSQL41."
.endif
.if !defined(WITH_POSTGRES)
@${ECHO_MSG} "You can enable PostGres support by defining WITH_POSTGRES."
.endif
.if !defined(WITH_UNIXODBC) && !defined(WITH_IODBC)
@${ECHO_MSG} "You can enable unixODBC support by defining WITH_UNIXODBC."
@${ECHO_MSG} "You can enable iodbc support by defining WITH_IODBC."
@${ECHO_MSG} "Note that you can support only ONE of these two ODBC libs."
.endif
.if !defined(WITH_SANE)
@${ECHO_MSG} "You can enable Sane support by defining WITH_SANE."
.endif
.if !defined(WITH_SANE) || !defined(HAVE_MESA)
@${ECHO_MSG} "You can enable MesaGL support by defining WITH_MESA."
.endif
.if !defined(WITH_PDF)
@${ECHO_MSG} "You can enable PDF support by defining WITH_PDF."
.endif
.if !defined(WITH_MOST)
@${ECHO_MSG} "You can enable most of the features here except Sane,"
@${ECHO_MSG} "MesaGLi and SQL support by defining WITH_MOST."
.endif
.if !defined(WITH_SVG2)
@${ECHO_MSG} "You can enable SVG2 image support by "
@${ECHO_MSG} "defining WITH_SVG2."
.endif
.if !defined(WITHOUT_RELOCATABLE_DUMPED_MODULES)
@${ECHO_MSG} "You can disable relocatable dumped modules by "
@${ECHO_MSG} "defining WITHOUT_RELOCATABLE_DUMPED_MODULES."
.endif
.if !defined(WITH_EXPIREMENTAL_FEATURES)
@${ECHO_MSG} "You can enable experemental features and optimization "
@${ECHO_MSG} "at you own risk by defining WITH_EXPIREMENTAL_FEATURES."
.endif
.if !defined(WITH_TDS)
@${ECHO_MSG} "You can enable direct access to Sybase and MS-SQL "
@${ECHO_MSG} "database using FreeTDS be defining WITH_TDS."
.endif
pre-configure:
@${ECHO} ${CONFIGURE_ARGS}
post-patch:
@${REINPLACE_CMD} -e 's| -lgmp| -L${LOCALBASE}/lib -lgmp|' \
${WRKSRC}/modules/Gmp/configure ${WRKSRC}/modules/_Image_XFace/configure
@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
${WRKSRC}/configure
post-install:
${INSTALL_PROGRAM} ${WRKSRC}pike ${PREFIX}/bin

View File

@ -1 +1,2 @@
MD5 (Pike-v7.4.31.tar.gz) = f265207184aa818a96e9460af2012be8
MD5 (Pike-v7.4.43.tar.gz) = 4cc38e0f846bd6e5dd49e4bc5e7d4b36
SIZE (Pike-v7.4.43.tar.gz) = 6794128

View File

@ -0,0 +1,46 @@
--- configure.old Sat Feb 21 19:42:58 2004
+++ configure Sat Feb 21 19:46:56 2004
@@ -24646,14 +24646,14 @@
if test "x$PTHREAD_CONFIG" = xno ; then
- echo "$as_me:24649: checking -pthread" >&5
-echo $ECHO_N "checking -pthread... $ECHO_C" >&6
+ echo "$as_me:24649: checking %%PTHREAD_CFLAGS%%" >&5
+echo $ECHO_N "checking %%PTHREAD_CFLAGS%%... $ECHO_C" >&6
if test "${pike_cv_option_pthread+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$OLD_CFLAGS -pthread"
+ CFLAGS="$OLD_CFLAGS %%PTHREAD_CFLAGS%%"
old_ac_link="$ac_link"
ac_link="$old_ac_link 2>conftezt.out.2"
if test "$cross_compiling" = yes; then
@@ -24760,10 +24760,10 @@
fi
if test x"$pike_cv_option_pthread" = "xyes" ; then
- CFLAGS="$CFLAGS -pthread"
+ CFLAGS="$CFLAGS %%PTHREAD_CFLAGS%%"
case "CFLAGS" in
OPTIMIZE)
- CFLAGS="$CFLAGS -pthread"
+ CFLAGS="$CFLAGS %%PTHREAD_CFLAGS%%"
;;
esac
echo "$as_me:24769: result: yes" >&5
@@ -24772,10 +24772,10 @@
else
echo "$as_me:24773: result: no" >&5
echo "${ECHO_T}no" >&6
- LIBS="$LIBS -lc_r"
+ LIBS="$LIBS %%PTHREAD_LIBS%%"
fi
- LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS-} -lc_r"
+ LD_FALLBACK_FLAGS="${LD_FALLBACK_FLAGS-} %%PTHREAD_LIBS%%"
echo "$as_me:24780: checking Initial stack limit" >&5
echo $ECHO_N "checking Initial stack limit... $ECHO_C" >&6

View File

@ -0,0 +1,11 @@
--- ../bin/install.pike.orig Sat Feb 21 19:48:27 2004
+++ ../bin/install.pike Sat Feb 21 19:48:47 2004
@@ -1332,7 +1332,7 @@
if(file_stat(vars->MANDIR_SRC))
{
- install_dir(vars->MANDIR_SRC,combine_path(man_prefix,"man1"),0);
+ //install_dir(vars->MANDIR_SRC,combine_path(man_prefix,"man1"),0);
}
};

View File

@ -0,0 +1,14 @@
--- modules/Postgres/pgres_config.h.in.orig Tue Feb 24 23:12:34 2004
+++ modules/Postgres/pgres_config.h.in Tue Feb 24 23:13:26 2004
@@ -27,7 +27,11 @@
* thread-safe on a per-connection level (as opposed to non-threadsafe).
*/
#ifdef HAVE_PQSETNONBLOCKING
+/*
+ * Thread safe PGSQL under Pike 7.4 is non working. So
+ * failback to non Thread Safe
# define PQ_THREADSAFE 1
+ */
#endif
/* End of autoconfigurable section */

View File

@ -451,8 +451,6 @@ pike/%%PORTVERSION%%/include/pike/aclocal.m4
@unexec rm -rf %D/pike/%%PORTVERSION%%/lib/tools
@unexec rm -rf %D/pike/%%PORTVERSION%%/include/pike
@dirrm pike/%%PORTVERSION%%/include
@dirrm pike/%%PORTVERSION%%/man/man1
@dirrm pike/%%PORTVERSION%%/man
@dirrm pike/%%PORTVERSION%%/bin
@dirrm pike/%%PORTVERSION%%/lib
@dirrm pike/%%PORTVERSION%%