[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD Port: dspam-devel-3.8.0,1
- To: "Ion-Mihai Tetcu" <itetcu_(_at_)_freebsd_(_dot_)_org>
- Subject: Re: FreeBSD Port: dspam-devel-3.8.0,1
- From: "Scot Hetzel" <swhetzel_(_at_)_gmail_(_dot_)_com>
- Date: Sun, 3 Jun 2007 21:49:46 -0500
- Cc: ports_(_at_)_freebsd_(_dot_)_org, Klaus Koch <klaus_(_at_)_sentinel_(_dot_)_dyndns_(_dot_)_info>
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=mf20Gs8txjZCxGpoQFoKSgJMpPxwgqwI5qv6lQbvyR4tFFzTWCET0DhHi2I7xeh4b+BFirqTwXc6PuYs5ISJVCkaFd2LutPbFzr+vFBWMcgRE66KAe5zFytTLgz+tNXc95d03DfLqLcgwx/qYPZzYWPbz58+vpgJVOFAJKO+sXU=
On 6/3/07, Ion-Mihai Tetcu <itetcu_(_at_)_freebsd_(_dot_)_org> wrote:
The only thing I can think of for improving this part is to set the
default MySQL version in the port's OPTIONs to the one installed on the
system, if any and default to 50 if no MySQL is installed. Which will
further complicate an already long (664 lines) Makefile with little
added benefit. IMO either there's no MySQL installed - in which case
the port is so friendly that it gives a nice screen for the user to
select the version he wants - or there is a MySQL version installed -
in which case one assumes the admin knows what version he has and
selects it in the OPTIONs screen. (I'm hacking the Makefile for this
but something doesn't work right yet).
There is even an easier solution, and that is to let
/usr/ports/Mk/bsd.database.mk do the selection of the MySQL port for
you depending on which version is installed on the system. And if
none is installed, then use the default version (currently MySQL 5.0).
This way there is no need for the WITH_MYSQLxx variables, and you
won't have to add a new variable when MySQL 5.2 is released. Your
port will automatically support it when bsd.database.mk is updated.
Attached for your review is a patch that implements this.
Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/dspam/Makefile,v
retrieving revision 1.61
diff -u -r1.61 Makefile
--- Makefile 13 Mar 2007 20:11:17 -0000 1.61
+++ Makefile 4 Jun 2007 02:36:54 -0000
@@ -49,15 +49,12 @@
OPTIONS+= CLAMAV_DEVEL "Enable clamav support" off
OPTIONS+= CLAMAV_LOCAL "RUN_DEPEND on selected clamav" on
#
-OPTIONS+= MYSQL40 "Use MySQL 4.0.x as back-end" off
-OPTIONS+= MYSQL41 "Use MySQL 4.1.x as back-end" off
-OPTIONS+= MYSQL50 "Use MySQL 5.0.x as back-end" on
-OPTIONS+= MYSQL51 "Use MySQL 5.1.x as back-end" off
+OPTIONS+= MYSQL "Use MySQL as back-end" on
OPTIONS+= MYSQL_COMPRESS "Compress dspam <--> MySQL" off
OPTIONS+= MYSQL_LOCAL "RUN_DEPEND on selected MySQL server ver." off
OPTIONS+= POSTGRESQL "Use PostgreSQL as back-end" on
OPTIONS+= POSTGRESQL_LOCAL "RUN_DEPEND on PostgreSQL server" off
OPTIONS+= ORACLE "Use Oracle as back-end (BROKEN)" off
OPTIONS+= SQLITE2 "Use SQLite v2.x as back-end" off
OPTIONS+= SQLITE3 "Use SQLite v3.x as back-end" on
OPTIONS+= HASH "Use hash driver" on
@@ -265,22 +262,7 @@
PLIST_SUB+= HASH="@comment "
.endif
-.ifdef(WITH_MYSQL40)
-WANT_MYSQL_VER= 40
-#PKGNAMESUFFIX= -mysql40
-.elifdef(WITH_MYSQL41)
-WANT_MYSQL_VER= 41
-#PKGNAMESUFFIX= -mysql41
-.elifndef(WITHOUT_MYSQL50)
-WANT_MYSQL_VER= 50
-#PKGNAMESUFFIX= -mysql50
-.elifdef(WITH_MYSQL51)
-WANT_MYSQL_VER= 51
-#PKGNAMESUFFIX= -mysql51
-.endif
-
-.if defined(WITH_MYSQL40) || defined(WITH_MYSQL41) || \
- !defined(WITHOUT_MYSQL50) || defined(WITH_MYSQL51)
+.if !defined(WITHOUT_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \
--with-mysql-libraries=${LOCALBASE}/lib/mysql
@@ -290,7 +271,7 @@
CONFIGURE_ARGS+= --enable-client-compression
. endif
. if defined(WITH_MYSQL_LOCAL)
-RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server
+RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${MYSQL_VER}-server
SUB_LIST+= MYSQL=mysql
. else
SUB_LIST+= MYSQL=
@@ -362,7 +343,7 @@
.endif
.ifdef(WITH_EXIM_LDA)
-. ifdef(WITH_MYSQL40) || (WITH_MYSQL41)
+. if ${MYSQL_VER} == 40 || ${MYSQL_VER} == 41
_EXIM_EXT= -mysql
. elifdef(WITH_POSTGRESQL)
_EXIM_EXT= -postgresql
@@ -537,10 +518,6 @@
@${ECHO_CMD} "You need MySQL, PostgreSQL or Hash for Daemon mode, because multithreading support is needed"
@${FALSE}
.endif
-.if ( defined(WITH_MYSQL40) && defined(WITH_MYSQL41) && !defined(WITHOUT_MYSQL50) && defined(WITH_MYSQL51))
- @${ECHO_CMD} "You can compile with only one MySQL version driver."
- @${FALSE}
-.endif
.if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \
!defined(WITHOUT_POSTGRESQL) || defined(USE_SQLITE) )
@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP."
_______________________________________________
freebsd-ports_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org