Bug 172659 - [PATCH] www/mediawiki: Missing OPTION in Makefile
Summary: [PATCH] www/mediawiki: Missing OPTION in Makefile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-13 10:20 UTC by Bernard Spil
Modified: 2015-03-06 09:28 UTC (History)
0 users

See Also:


Attachments
file.diff (1.32 KB, patch)
2012-10-13 10:20 UTC, Bernard Spil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Spil freebsd_committer freebsd_triage 2012-10-13 10:20:01 UTC
Building www/mediawiki failed with 

# make
"Makefile", line 59: Malformed conditional (${PORT_OPTIONS:MAPC} || ${PORTS_OPTIONS:MEACCEL} || ${PORTS_OPTIONS:MXCACHE})
"Makefile", line 67: if-less endif
make: fatal errors encountered -- cannot continue

Checked the Makefile and found that the option XCACHE was missing from OPTIONS_DEFINE and there was no XCACHE_DESC line.

Patched the Makefile, removed the nested if for the PHP Accelerator selection and moved pecl-APC to the preferred Accelerator when multiple are used.

Fix: diff -ruN Makefile.orig Makefile
--- Makefile.orig       2012-10-13 11:13:24.000000000 +0200
+++ Makefile    2012-10-13 11:15:05.000000000 +0200
@@ -21,12 +21,13 @@

 NO_BUILD=      yes

-OPTIONS_DEFINE=        MYSQL PGSQL SQLITE LDAP MEMCACHED APC EACCEL IMAGICK
+OPTIONS_DEFINE=        MYSQL PGSQL SQLITE LDAP MEMCACHED APC EACCEL XCACHE IMAGICK
 OPTIONS_DEFAULT=MYSQL APC

 MEMCACHED_DESC=        use memcached
 APC_DESC=      use pecl-APC(Mediawiki recommended)
 EACCEL_DESC=   use eAccelerator (instead of pecl-APC)
+XCACHE_DESC=    use xCache (instead of pecl-APC)
 IMAGICK_DESC=  use ImageMagick

 .include <bsd.port.options.mk>
@@ -56,14 +57,12 @@
 RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:${PORTSDIR}/graphics/pecl-imagick
 .endif

-.if ${PORT_OPTIONS:MAPC} || ${PORTS_OPTIONS:MEACCEL} || ${PORTS_OPTIONS:MXCACHE}
-.if ${PORT_OPTIONS:MEACCEL}
+.if ${PORT_OPTIONS:MAPC}
+RUN_DEPENDS+=   ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/apc.so:${PORTSDIR}/www/pecl-APC
+.elif ${PORT_OPTIONS:MEACCEL}
 RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/eaccelerator.so:${PORTSDIR}/www/eaccelerator
 .elif ${PORT_OPTIONS:MXCACHE}
 RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/xcache.so:${PORTSDIR}/www/xcache
-.else
-RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/apc.so:${PORTSDIR}/www/pecl-APC
-.endif
 .endif

 do-install:


Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-13 10:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Wen Heping freebsd_committer freebsd_triage 2012-10-13 15:54:36 UTC
State Changed
From-To: open->closed

Committed. Thanks !