Bug 179137 - www/mediawiki118 & www/mediawiki120: do not depend on MySQL server
Summary: www/mediawiki118 & www/mediawiki120: do not depend on MySQL server
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: 2013-05-31 09:00 UTC by Remko Lodder
Modified: 2013-06-01 08:30 UTC (History)
0 users

See Also:


Attachments
file.diff (185 bytes, patch)
2013-05-31 09:00 UTC, Remko Lodder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remko Lodder freebsd_committer freebsd_triage 2013-05-31 09:00:00 UTC
Both mentioned Mediawiki ports still depend on the MySQL server, which is not needed to let mediawiki function properly. This was corrected for mediawiki119, but both other ports weren't adopted along. I am sending the patch for both ports now.

In addition the mediawiki118 could use some love and care for OptionsNG and such, which is included in the diff as well.

Fix: Both patches can be found below or at:

https://www.evilcoder.org/tmp/mediawiki118.diff
https://www.evilcoder.org/tmp/mediawiki120.diff

PORTNAME=      mediawiki
 PORTVERSION=   1.18.6
@@ -13,48 +10,63 @@
 MAINTAINER=    wen@FreeBSD.org
 COMMENT=       The wiki engine used by Wikipedia

+LICENSE=       GPLv2
+
 DEPRECATED=    Unmaintained upstream
 EXPIRATION_DATE=2013-08-01

 CONFLICTS=     mediawiki-1.19.* mediawiki-1.2[0-9].*

 FETCH_ARGS=    -pr
-NO_LATEST_LINK=        yes
 USE_PHP=       ctype iconv mbstring pcre session xml zlib readline dom
-IGNORE_WITH_PHP=       4
+IGNORE_WITH_PHP=4
 WANT_PHP_WEB=  yes
 MEDIAWIKIDIR?= www/mediawiki
+
 NO_BUILD=      yes

-OPTIONS=       PGSQL "Use PostgreSQL (instead of MySQL)" off \
-               LDAP "Use LDAP authentication" off \
-               APC "Use pecl-APC" on \
-               EACCEL "Use eAccelerator (instead of pecl-APC)" off \
-               IMAGICK "Use ImageMagick" off
+OPTIONS_DEFINE=        MYSQL PGSQL SQLITE LDAP MEMCACHED APC EACCEL XCACHE IMAGICK
+OPTIONS_DEFAULT=MYSQL APC

-.include <bsd.port.pre.mk>
+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

-.if defined(WITH_PGSQL)
-USE_PHP+=      pgsql
-.else
-USE_MYSQL=     server
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MMYSQL}
+USE_MYSQL=     client
 USE_PHP+=      mysql
 .endif

-.if defined(WITH_LDAP)
+.if ${PORT_OPTIONS:MPGSQL}
+USE_PHP+=      pgsql
+.endif
+
+.if ${PORT_OPTIONS:MSQLITE}
+USE_PHP+=      sqlite
+.endif
+
+.if ${PORT_OPTIONS:MLDAP}
 USE_PHP+=      ldap
 .endif

-.if defined(WITH_IMAGICK)
+.if ${PORT_OPTIONS:MMEMCACHED}
+RUN_DEPENDS=   memcached:${PORTSDIR}/databases/memcached
+.endif
+
+.if ${PORT_OPTIONS:MIMAGICK}
 RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:${PORTSDIR}/graphics/pecl-imagick
 .endif

-.if defined(WITH_APC) || defined(WITH_EACCEL)
-.if defined(WITH_EACCEL)
-RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/eaccelerator.so:${PORTSDIR}/www/eaccelerator
-.else
+.if ${PORT_OPTIONS:MAPC}
 RUN_DEPENDS+=  ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/apc.so:${PORTSDIR}/www/pecl-APC
-.endif
+.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
 .endif

 do-install:
@@ -69,4 +81,4 @@
                | ${SED} -ne 's,^${WRKSRC},@dirrm ${MEDIAWIKIDIR},p' >> ${TMPPLIST}
        @${SED} -e 's|%%MEDIAWIKIDIR%%|${PREFIX}/${MEDIAWIKIDIR}|' ${PKGMESSAGE}

-.include <bsd.port.post.mk>
+.include <bsd.port.mk>





.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL=     server
+USE_MYSQL=     client
 USE_PHP+=      mysql
 .endif--dbgDtKvgAU0jHVnSN3lO9Q597ybmEVfWWmlpZaTrAxx2zOAC
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- mediawiki118/Makefile.orig  2013-05-01 17:59:48.000000000 +0200
+++ mediawiki118/Makefile       2013-05-31 09:50:29.000000000 +0200
@@ -1,9 +1,6 @@
-# New ports collection makefile for:   www/mediawiki
-# Date created:                                February 1st 2005
-# Whom:                                        Gerrit Beine <tux@pinguru.net>
-#
+
+# Created by: Gerrit Beine <tux@pinguru.net>
 # $FreeBSD: www/mediawiki118/Makefile 317030 2013-05-01 15:59:48Z wen $
-#
How-To-Repeat: Install either of one of the ports and see MySQL-server being sucked in as dependency.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-31 09:00:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-06-01 03:47:38 UTC
Author: wen
Date: Sat Jun  1 02:47:31 2013
New Revision: 319553
URL: http://svnweb.freebsd.org/changeset/ports/319553

Log:
  - Do not depend on MySQL server but client
  
  PR:		179137
  Submitted by:	remko@

Modified:
  head/www/mediawiki120/Makefile

Modified: head/www/mediawiki120/Makefile
==============================================================================
--- head/www/mediawiki120/Makefile	Sat Jun  1 02:40:39 2013	(r319552)
+++ head/www/mediawiki120/Makefile	Sat Jun  1 02:47:31 2013	(r319553)
@@ -33,7 +33,7 @@ IMAGICK_DESC=	use ImageMagick
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL=	server
+USE_MYSQL=	client
 USE_PHP+=	mysql
 .endif
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-06-01 08:20:39 UTC
Author: wen
Date: Sat Jun  1 07:20:30 2013
New Revision: 319557
URL: http://svnweb.freebsd.org/changeset/ports/319557

Log:
  - Do not depend on MySQL server but client
  - Trim Makefile headers
  - Add LICENSE
  - Convert to optionsNG
  
  PR:		179137
  Submitted by:	remko@

Modified:
  head/www/mediawiki118/Makefile

Modified: head/www/mediawiki118/Makefile
==============================================================================
--- head/www/mediawiki118/Makefile	Sat Jun  1 07:16:13 2013	(r319556)
+++ head/www/mediawiki118/Makefile	Sat Jun  1 07:20:30 2013	(r319557)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	www/mediawiki
-# Date created:				February 1st 2005
-# Whom:	      				Gerrit Beine <tux@pinguru.net>
-#
+# Created by: Gerrit Beine <tux@pinguru.net>
 # $FreeBSD$
-#
 
 PORTNAME=	mediawiki
 PORTVERSION=	1.18.6
@@ -13,48 +9,63 @@ MASTER_SITES=	http://dumps.wikimedia.org
 MAINTAINER=	wen@FreeBSD.org
 COMMENT=	The wiki engine used by Wikipedia
 
+LICENSE=	GPLv2
+
 DEPRECATED=	Unmaintained upstream
 EXPIRATION_DATE=2013-08-01
 
 CONFLICTS=	mediawiki-1.19.* mediawiki-1.2[0-9].*
 
 FETCH_ARGS=	-pr
-NO_LATEST_LINK=	yes
 USE_PHP=	ctype iconv mbstring pcre session xml zlib readline dom
-IGNORE_WITH_PHP=	4
+IGNORE_WITH_PHP=4
 WANT_PHP_WEB=	yes
 MEDIAWIKIDIR?=	www/mediawiki
+
 NO_BUILD=	yes
 
-OPTIONS=	PGSQL "Use PostgreSQL (instead of MySQL)" off \
-		LDAP "Use LDAP authentication" off \
-		APC "Use pecl-APC" on \
-		EACCEL "Use eAccelerator (instead of pecl-APC)" off \
-		IMAGICK "Use ImageMagick" off
+OPTIONS_DEFINE=	MYSQL PGSQL SQLITE LDAP MEMCACHED APC EACCEL XCACHE IMAGICK
+OPTIONS_DEFAULT=MYSQL APC
 
-.include <bsd.port.pre.mk>
+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
 
-.if defined(WITH_PGSQL)
-USE_PHP+=	pgsql
-.else
-USE_MYSQL=	server
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MMYSQL}
+USE_MYSQL=	client
 USE_PHP+=	mysql
 .endif
 
-.if defined(WITH_LDAP)
+.if ${PORT_OPTIONS:MPGSQL}
+USE_PHP+=	pgsql
+.endif
+
+.if ${PORT_OPTIONS:MSQLITE}
+USE_PHP+=	sqlite
+.endif
+
+.if ${PORT_OPTIONS:MLDAP}
 USE_PHP+=	ldap
 .endif
 
-.if defined(WITH_IMAGICK)
+.if ${PORT_OPTIONS:MMEMCACHED}
+RUN_DEPENDS=	memcached:${PORTSDIR}/databases/memcached
+.endif
+
+.if ${PORT_OPTIONS:MIMAGICK}
 RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:${PORTSDIR}/graphics/pecl-imagick
 .endif
 
-.if defined(WITH_APC) || defined(WITH_EACCEL)
-.if defined(WITH_EACCEL)
-RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/eaccelerator.so:${PORTSDIR}/www/eaccelerator
-.else
+.if ${PORT_OPTIONS:MAPC}
 RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/apc.so:${PORTSDIR}/www/pecl-APC
-.endif
+.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
 .endif
 
 do-install:
@@ -69,4 +80,4 @@ post-install:
 		| ${SED} -ne 's,^${WRKSRC},@dirrm ${MEDIAWIKIDIR},p' >> ${TMPPLIST}
 	@${SED} -e 's|%%MEDIAWIKIDIR%%|${PREFIX}/${MEDIAWIKIDIR}|' ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Wen Heping freebsd_committer freebsd_triage 2013-06-01 08:22:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!