[30318] trunk/dports/databases/mysql5-devel/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 24 09:05:06 PDT 2007


Revision: 30318
          http://trac.macosforge.org/projects/macports/changeset/30318
Author:   jwa at macports.org
Date:     2007-10-24 09:05:05 -0700 (Wed, 24 Oct 2007)

Log Message:
-----------
dropping configure option --program-suffix declared broken per ticket #12954, relaxing restriction on Panther (I was reluctant to say anything about it not having a system to test the installation, but somebody seems to have interest)

Modified Paths:
--------------
    trunk/dports/databases/mysql5-devel/Portfile

Modified: trunk/dports/databases/mysql5-devel/Portfile
===================================================================
--- trunk/dports/databases/mysql5-devel/Portfile	2007-10-24 15:27:06 UTC (rev 30317)
+++ trunk/dports/databases/mysql5-devel/Portfile	2007-10-24 16:05:05 UTC (rev 30318)
@@ -9,7 +9,7 @@
 categories		databases
 platforms		darwin
 
-maintainers		openmaintainer jwa
+maintainers		jwa openmaintainer
 
 description		Multithreaded SQL database server
 long_description	MySQL is an open-source, multi-threaded SQL database \
@@ -34,6 +34,11 @@
 depends_lib port:zlib \
     port:openssl
 
+#set major_version   [strsed ${version} {s/\..*$//}]
+set major_version   [strsed ${vers} {s/\..*$//}]
+set mysql           mysql${major_version}
+#set dbdir           ${prefix}/var/db/${mysql}
+set sysconfdir      ${prefix}/etc/${name}
 set dbdir       ${prefix}/var/db/${name}
 set mysqluser	mysql
 
@@ -44,8 +49,7 @@
     --bindir=${prefix}/lib/${name}/bin \
     --includedir=${prefix}/include/${name} \
     --datadir=${prefix}/share/${name} \
-    --sysconfdir=${prefix}/etc/${name} \
-    --program-suffix=5 \
+    --sysconfdir=${sysconfdir} \
     --with-zlib-dir=${prefix} \
     --with-ssl=${prefix} \
     --with-extra-charsets=complex \
@@ -56,6 +60,8 @@
     --with-plugins=all \
     --without-server \
     --enable-thread-safe-client
+# the following is in store for future
+#    --program-suffix=5
 
 post-configure {
     reinplace "s;openssl_includes = -I;openssl_includes_includes = -I${prefix}/include/openssl;" ${worksrcpath}/tests/Makefile
@@ -63,16 +69,10 @@
 
 platform darwin 6 {
     pre-fetch {
-	return -code error "no support for systems prior to 10.4"
+	return -code error "no support for systems prior to 10.3"
     }
 }
 
-platform darwin 7 {
-    pre-fetch {
-	return -code error "no support for systems prior to 10.4"
-    }
-}
-
 platform darwin 8 {
     configure.compiler	gcc-4.0
     configure.cppflags-append	-I${worksrcpath}/include
@@ -86,7 +86,7 @@
     startupitem.stop	"${prefix}/share/${name}/mysql/mysql.server stop"
 }
 
-# the directory ${prefix}/sql-bench
+# the directories ${prefix}/sql-bench ${prefix}/mysql-test
 destroot.violate_mtree	yes
 
 pre-destroot {
@@ -113,11 +113,19 @@
 }
 
 post-destroot {
-    system "rm -rf ${destroot}${prefix}/mysql-test/"
+    delete ${destroot}${prefix}/mysql-test
 	
+    # Fix paths in manpages and sample configuration files
+    foreach manpage [glob -type f ${destroot}${prefix}/share/man/man\[1-9\]/*] {
+	reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage}
+    }
+    foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${name}/mysql/my-*.cnf] {
+	reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
+    }
+	
     # Symlink mysql binaries into bin directory
     foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] {
-	ln -sf ${prefix}/lib/${name}/bin/${f} ${destroot}${prefix}/bin
+	ln -sf ${prefix}/lib/${name}/bin/${f} ${destroot}${prefix}/bin/${f}${major_version}
     }
 }
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071024/e77a77b5/attachment.html


More information about the macports-changes mailing list