port install postfix @2.9.2_0 +mysql55 fails to build

Bjarne D Mathiesen macintosh at mathiesen.info
Wed May 9 13:21:32 PDT 2012


Bradley Giesbrecht wrote:
> 
> On May 6, 2012, at 5:05 PM, Ryan Schmidt wrote:
> 
>>
>> On May 6, 2012, at 19:03, Bjarne D Mathiesen wrote:
>>
>>> so ... for some reason when using mysql55 postfix cant find <mysql.h>
>>
>> I agree. In any case, you should file a bug report in our issue tracker so the maintainer of the port can begin to look into fixing the problem.
> 
> I have noticed some ports are not building correctly using mysql_confg from msyql55.
> I have not had the time to track this down. I suspect the percona port may have a similar issue as there is little difference between the mysql55 and percona ports.
> 
> I am in the process of comparing the output of mysql_config from all the mysql ports.

I think I've discovered what't going wrong ... at least I've got postfix
+mysql55 to build now !!!

take a look at this:
	bash-4.2$ find /macports/include -iname 'mysql.h' -type f
	/macports/include/mysql51/mysql/mysql.h
	/macports/include/mysql55/mysql.h
and notice that there's a small difference in where mysql.h is actually
located.

now, doing a little testing :
	rsync -a /macports/include/mysql55/ \
		/macports/include/mysql55/mysql
magically solve all of my problems !!!

the error seems to be in the patchfile where MacPorts redefines the
install layout : patch-cmake-install_layout.cmake.diff

+#
+SET(INSTALL_INCLUDEDIR_MACPORTS         "include/@NAME@")
+#
should be :
+#
+SET(INSTALL_INCLUDEDIR_MACPORTS         "include/@NAME@/mysql")
+#

I've attached at modifed patch-cmake-install_layout.cmake.diff

I've been all over mysql_config and backported the changes from the
mysql51 version to the mysql55 version without any result, but the above
fixed things up perfectly :-)

:-D
-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
-------------- next part --------------
--- a/cmake/install_layout.cmake	2012-03-15 07:14:58.000000000 -0700
+++ b/cmake/install_layout.cmake	2012-03-17 08:44:13.000000000 -0700
@@ -68,7 +68,7 @@
 ENDIF()
 
 SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")
+CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4, MACPORTS")
 
 IF(UNIX)
   IF(INSTALL_LAYOUT MATCHES "RPM")
@@ -86,7 +86,7 @@
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4" "MACPORTS")
   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
   IF(ind EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
@@ -214,6 +214,31 @@
 SET(INSTALL_MYSQLDATADIR_SVR4           "/var/lib/mysql")
 SET(INSTALL_PLUGINTESTDIR_SVR4          ${plugin_tests})
 
+#
+# MACPORTS layout
+#
+SET(INSTALL_BINDIR_MACPORTS             "lib/@NAME@/bin")
+SET(INSTALL_SBINDIR_MACPORTS            "lib/@NAME@/bin")
+SET(INSTALL_SCRIPTDIR_MACPORTS          "lib/@NAME@/scripts")
+#
+SET(INSTALL_LIBDIR_MACPORTS             "lib/@NAME@/mysql")
+SET(INSTALL_PLUGINDIR_MACPORTS          "lib/@NAME@/plugin")
+#
+SET(INSTALL_INCLUDEDIR_MACPORTS         "include/@NAME@/mysql")
+#
+SET(INSTALL_DOCDIR_MACPORTS             "share/docs/@NAME@")
+SET(INSTALL_DOCREADMEDIR_MACPORTS       "share/docs/@NAME@")
+SET(INSTALL_MANDIR_MACPORTS             "share/man/@NAME@")
+SET(INSTALL_INFODIR_MACPORTS            "share/docs/@NAME@")
+#
+SET(INSTALL_SHAREDIR_MACPORTS           "share/@NAME@")
+SET(INSTALL_MYSQLSHAREDIR_MACPORTS      "share/@NAME@")
+SET(INSTALL_MYSQLTESTDIR_MACPORTS       "share/@NAME@/mysql-test")
+SET(INSTALL_SQLBENCHDIR_MACPORTS        "share/@NAME@")
+SET(INSTALL_SUPPORTFILESDIR_MACPORTS    "share/@NAME@/support-files")
+#
+SET(INSTALL_MYSQLDATADIR_MACPORTS       "var/db/@NAME@")
+SET(INSTALL_PLUGINTESTDIR_MACPORTS      ${plugin_tests})
 
 # Clear cached variables if install layout was changed
 IF(OLD_INSTALL_LAYOUT)


More information about the macports-dev mailing list