tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysutils/strigi cannot find textproc/libxml2 in bootstrap pkgsrc



I guess I can figure this out after all.

It turns out that the problem (which actually also affects packages
other than strigi) is the result of various hard-coded /usr/pkg paths
lying around in files that cmake uses.  They fall into three different
categories.

- cmake-installed files:  the cmake package installs the
  Modules/Platform/UnixPaths.cmake file with a hard-coded /usr/pkg
  path even though it was bootstrapped with a different prefix.

- mk/cmake-Modules/Platform/UnixPaths.cmake: this file includes a
  hard-coded /usr/pkg path, and may override the same file provided by
  cmake.

- package-specific files:  some packages (e.g., strigi) have files
  with /usr/pkg hard-coded into them regardless of the prefix used
  while bootstrapping.

This brings up the question of how to proceed.  I'm not certain that
all of this needs to be discussed together, so I'll start with the
first as that seems most straightforward.

A patch relative to pkgsrc-2011Q2 that will fix the problem mentioned
above is the following.  I have not tested HEAD yet, but there seems
nothing different related to this particular problem.

Index: devel/cmake/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cmake/Makefile,v
retrieving revision 1.57
diff -u -r1.57 Makefile
--- devel/cmake/Makefile        22 Apr 2011 13:43:16 -0000      1.57
+++ devel/cmake/Makefile        25 Aug 2011 18:18:31 -0000
@@ -45,9 +45,9 @@
 
 SUBST_CLASSES+=                cmake
 SUBST_STAGE.cmake=     pre-configure
-SUBST_MESSAGE.cmake=   Fixing X11 prefix.
+SUBST_MESSAGE.cmake=   Fixing PREFIX and X11 paths.
 SUBST_FILES.cmake=     Modules/Platform/UnixPaths.cmake
-SUBST_VARS.cmake=      X11BASE
+SUBST_VARS.cmake=      PREFIX X11BASE
 
 SUBST_CLASSES+=                flags
 SUBST_STAGE.flags=     pre-configure
Index: devel/cmake/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cmake/distinfo,v
retrieving revision 1.29
diff -u -r1.29 distinfo
--- devel/cmake/distinfo        22 Feb 2011 15:05:33 -0000      1.29
+++ devel/cmake/distinfo        25 Aug 2011 18:18:31 -0000
@@ -3,6 +3,6 @@
 SHA1 (cmake-2.8.4.tar.gz) = 6c42699bd63fdfcc7743d4906e3208d051d7f19b
 RMD160 (cmake-2.8.4.tar.gz) = 8b92eb11391b07433e7fe02bbb80c3ebcaaf1893
 Size (cmake-2.8.4.tar.gz) = 5477628 bytes
-SHA1 (patch-aa) = c16ba8be422ec243995cd5d475324d469d08c37a
+SHA1 (patch-aa) = 2a2fadcde4fe2f286651ab31998ea0098949a21a
 SHA1 (patch-ab) = c3bb671d98e0d91e32e94f8d8b8203e647559543
 SHA1 (patch-ac) = 1f11e98d50127fae12286708215a90f118b2d2bc
Index: devel/cmake/patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cmake/patches/patch-aa,v
retrieving revision 1.7
diff -u -r1.7 patch-aa
--- devel/cmake/patches/patch-aa        11 Nov 2010 08:34:02 -0000      1.7
+++ devel/cmake/patches/patch-aa        25 Aug 2011 18:18:31 -0000
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.7 2010/11/11 08:34:02 adam Exp $
 
---- Modules/Platform/UnixPaths.cmake.orig      2010-11-03 19:58:27.000000000 
+0000
+--- Modules/Platform/UnixPaths.cmake.orig      2011-02-15 17:47:27.000000000 
+0000
 +++ Modules/Platform/UnixPaths.cmake
-@@ -48,7 +48,7 @@ LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+@@ -48,10 +48,10 @@ LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
    /usr/include/w32api
  
    # X11
@@ -10,8 +10,12 @@
 +  @X11BASE@/include /usr/X11R6/include /usr/include/X11
  
    # Other
-   /usr/pkg/include
-@@ -61,7 +61,7 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+-  /usr/pkg/include
++  @PREFIX@/include
+   /opt/csw/include /opt/include  
+   /usr/openwin/include
+   )
+@@ -61,16 +61,16 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
    /usr/lib/w32api
  
    # X11
@@ -19,4 +23,15 @@
 +  @X11BASE@/lib /usr/X11R6/lib /usr/lib/X11
  
    # Other
-   /usr/pkg/lib
+-  /usr/pkg/lib
++  @PREFIX@/lib
+   /opt/csw/lib /opt/lib 
+   /usr/openwin/lib
+   )
+ 
+ LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+-  /usr/pkg/bin
++  @PREFIX@/bin
+   )
+ 
+ LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES

The idea here is to make sure that the paths actually reflect the
prefix used.

Is this the correct solution to the problem?  Is it ok to commit this
before dealing with the other issues raised above?

Thanks for your thoughts.

Cheers,
Brook


Home | Main Index | Thread Index | Old Index