From 884259f42e8772908e2254de85136b4cc2a03cbb Mon Sep 17 00:00:00 2001 From: Sam Lawrance Date: Tue, 31 Oct 2006 21:54:23 +0000 Subject: [PATCH] Replace homegrown option scripts with OPTIONS. Tidy up. PR: ports/104367 Submitted by: Frank J. Laszlo Approved by: Xavier Beaudouin (maintainer) --- lang/pike70/Makefile | 98 +++++++++++++---- lang/pike70/files/patch-bin-install.pike | 4 +- lang/pike70/scripts/configure.pike | 131 ----------------------- 3 files changed, 77 insertions(+), 156 deletions(-) delete mode 100644 lang/pike70/scripts/configure.pike diff --git a/lang/pike70/Makefile b/lang/pike70/Makefile index ab47bda4b5ca..f4705072e78d 100644 --- a/lang/pike70/Makefile +++ b/lang/pike70/Makefile @@ -21,37 +21,89 @@ COMMENT= A dynamic programming language with a syntax similar to C++ BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison/ WRKSRC= ${WRKDIR}/${DISTNAME}/src/ +PATCH_WRKSRC= ${WRKDIR}/${DISTNAME} -IS_INTERACTIVE= yes -GNU_CONFIGURE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS+=--without-debug --with-poll --with-oob --with-max-fds=10000 --without-GTK MAN1= hilfe.1 pike.1 +PLIST_SUB+= PORTVERSION=${PORTVERSION} + +OPTIONS= FREETYPE "TrueType font rendering" off \ + JPEG "support JPEG" off \ + THREADS "threads support" on \ + GDBM "GNU database manager support" off \ + ZLIB "zlib library support" on \ + GMP "support bignums" on \ + READLINE "support for command line editing" on \ + MYSQL "MySQL database support" off \ + POSTGRESQL "PostgreSQL database support" off \ + MSQL "mSQL database support" off \ + SSL "SSL support" off \ .include -.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) -.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" +.if !defined(WITHOUT_FREETYPE) +LIB_DEPENDS+= ttf.4:${PORTSDIR}/print/freetype +CONFIGURE_ARGS+= --with-ttflib .else -CONFIGURE_ARGS?= \ - --without-ttflib \ - --without-gdbm \ - --without-mysql \ - --without-postgresql \ - --without-msql \ - --without-jpeg +CONFIGURE_ARGS+= --without-ttflib .endif -CONFIGURE_ARGS+= --without-debug --with-poll --with-oob --with-max-fds=10000 --without-GTK -PLIST_SUB+= PORTVERSION=${PORTVERSION} - -pre-fetch: -.if !defined(BATCH) - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.pike +.if !defined(WITHOUT_THREADS) +CONFIGURE_ARGS+= --with-threads +.else +CONFIGURE_ARGS+= --without-threads +.endif +.if !defined(WITHOUT_GMP) +LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4 +CONFIGURE_ARGS+= --with-gmp --with-bignums +.else +CONFIGURE_ARGS+= --without-gmp --without-bignums +.endif +.if !defined(WITHOUT_READLINE) +CONFIGURE_ARGS+= --with-readline +.else +CONFIGURE_ARGS+= --without-readline +.endif +.if !defined(WITHOUT_JPEG) +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg +CONFIGURE_ARGS+= --with-jpeg=${PREFIX} +.else +CONFIGURE_ARGS+= --without-jpeg +.endif +.if !defined(WITHOUT_GDBM) +LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm +CONFIGURE_ARGS+= --with-gdbm=${PREFIX} +.else +CONFIGURE_ARGS+= --without-gdbm +.endif +.if !defined(WITHOUT_ZLIB) +CONFIGURE_ARGS+= --with-zlib +.else +CONFIGURE_ARGS+= --without-zlib +.endif +.if !defined(WITHOUT_MYSQL) +USE_MYSQL= yes +CONFIGURE_ARGS+= --with-mysql=${PREFIX} +.else +CONFIGURE_ARGS+= --without-mysql +.endif +.if !defined(WITHOUT_POSTGRESQL) +USE_PGSQL= yes +CONFIGURE_ARGS+= --with-pgsql=${PREFIX}/pgsql +.else +CONFIGURE_ARGS+= --without-pgsql +.endif +.if !defined(WITHOUT_MSQL) +BUILD_DEPENDS+= msql:${PORTSDIR}/databases/msql +CONFIGURE_ARGS+= --with-msql=${PREFIX} +.else +CONFIGURE_ARGS+= --without-msql +.endif +.if !defined(WITHOUT_SSL) +CONFIGURE_ARGS+= --with-ssleay +.else +CONFIGURE_ARGS+= --without-ssleay .endif - -pre-configure: - @${ECHO} ${CONFIGURE_ARGS} - -pre-clean: - @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc post-install: ${INSTALL_PROGRAM} ${WRKSRC}pike ${PREFIX}/bin diff --git a/lang/pike70/files/patch-bin-install.pike b/lang/pike70/files/patch-bin-install.pike index c4a854b47597..71e9732bf3c8 100644 --- a/lang/pike70/files/patch-bin-install.pike +++ b/lang/pike70/files/patch-bin-install.pike @@ -1,5 +1,5 @@ ---- ../bin/install.pike.orig Mon Sep 24 17:52:22 2001 -+++ ../bin/install.pike Thu Oct 12 19:53:38 2006 +--- bin/install.pike.orig Mon Sep 24 17:52:22 2001 ++++ bin/install.pike Thu Oct 12 19:53:38 2006 @@ -986,12 +986,12 @@ lnk=combine_path(vars->exec_prefix || combine_path(vars->prefix, "bin"),"pike"); old_exec_prefix=vars->exec_prefix; // to make the directory for pike link diff --git a/lang/pike70/scripts/configure.pike b/lang/pike70/scripts/configure.pike deleted file mode 100644 index f1cf6ffdbbb2..000000000000 --- a/lang/pike70/scripts/configure.pike +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh - -if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then - exit -fi - -/usr/bin/dialog --title "Pike configuration options" --clear \ - --checklist "\n\ -Please select desired options:" -1 -1 11 \ -FreeType "TrueType font rendering" OFF \ -JPEG "support JPEG" OFF \ -threads "threads support" ON \ -GDBM "GNU database manager support" OFF \ -zlib "zlib library support" ON \ -gmp "support bignums" ON \ -readline "support for command line editing" ON \ -MySQL "MySQL database support" OFF \ -PostgreSQL "PostgreSQL database support" OFF \ -mSQL "mSQL database support" OFF \ -ssl "SSL support" OFF \ -2> /tmp/checklist.tmp.$$ -retval=$? - -if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` -fi -rm -f /tmp/checklist.tmp.$$ - -case $retval in - 0) if [ -z "$*" ]; then - echo "Nothing selected" - fi - ;; - 1) echo "Cancel pressed." - exit 1 - ;; -esac - -mkdir -p ${WRKDIRPREFIX}${CURDIR} -> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - -while [ "$1" ]; do - case $1 in - \"FreeType\") - echo 'LIB_DEPENDS+= ttf.4:${PORTSDIR}/print/freetype' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-ttflib' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - FreeType=1 - ;; - \"threads\") - threads=1 - ;; - \"gmp\") - echo '.if ${OSVERSION} >= 500000' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo '.endif' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-gmp' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - gmp=1 - ;; - \"readline\") - echo 'CONFIGURE_ARGS+= --with-readline' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - readline=1 - ;; - \"JPEG\") - echo 'LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-jpeg=${PREFIX}' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - JPEG=1 - ;; - \"GDBM\") - echo 'LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-gdbm=${PREFIX}' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - GDBM=1 - ;; - \"zlib\") - echo 'CONFIGURE_ARGS+= --with-zlib' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - zlib=1 - ;; - \"MySQL\") - echo 'LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-mysql=${PREFIX}' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - MySQL=1 - ;; - \"PostgreSQL\") - echo 'USE_PGSQL= yes' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-pgsql=${PREFIX}/pgsql' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - PostgresSQL=1 - ;; - \"mSQL\") - echo 'BUILD_DEPENDS+= msql:${PORTSDIR}/databases/msql' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - echo 'CONFIGURE_ARGS+= --with-msql=${PREFIX}' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - mSQL=1 - ;; - \"ssl\") - echo 'CONFIGURE_ARGS+= --with-ssleay' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - ssl=1 - ;; - esac - shift -done -if [ -z "$FreeType" ]; then - echo 'CONFIGURE_ARGS+= --without-ttflib' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$threads" ]; then - echo 'CONFIGURE_ARGS+= --without-threads' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$GDBM" ]; then - echo 'CONFIGURE_ARGS+= --without-gdbm' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$zlib" ]; then - echo 'CONFIGURE_ARGS+= --without-zlib' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$MySQL" ]; then - echo 'CONFIGURE_ARGS+= --without-mysql' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$PostgreSQL" ]; then - echo 'CONFIGURE_ARGS+= --without-postgresql' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$mSQL" ]; then - echo 'CONFIGURE_ARGS+= --without-msql' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$gmp" ]; then - echo 'CONFIGURE_ARGS+= --without-gmp --without-bignums' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$JPEG" ]; then - echo 'CONFIGURE_ARGS+= --without-jpeg' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -if [ -z "$readline" ]; then - echo 'CONFIGURE_ARGS+= --without-readline' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -if [ -z "$ssl" ]; then - echo 'CONFIGURE_ARGS+= --without-ssl' >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc -fi -fi