pkgsrc/emulators/openmsx/patches/patch-build_libraries.py
marino f77d18f8b7 emulators/openmsx: Fix build for NetBSD
There were two problems building openMSX on NetBSD:
1) The was a name conflict with the funcion bswap16.  This only appeared
   on one file, so the function was prefixed with msx_ to solve it.
2) freetype-config is not located on $PREFIX on NetBSD with native X11.
   Normally the wrappers abstract this but openmsx was making assumptions
   and using absolute paths.  The solution was to set the distroRoot
   value to "None" which tells the configure process to not use a path
   and those finds freetype-configure through the search path.

I compiled it, installed it, and executed openMSX with these patches.
2012-08-27 13:27:33 +00:00

26 lines
1 KiB
Python

$NetBSD: patch-build_libraries.py,v 1.1 2012/08/27 13:27:33 marino Exp $
The library check script is making assumptions about program locations.
The secret is define distroRoot as "None" so that no absolute path is
prepended on the binary.
freetype-config is tricky because on NetBSD with native X11, it will
not be found at $PREFIX, but rather a X11 path. The wrappers handle
this so use distroRoot=None to let configure search for freetype-config
and find it in the wrapper directories.
--- build/libraries.py.orig 2012-08-12 12:29:37.000000000 +0000
+++ build/libraries.py
@@ -168,10 +168,8 @@ class FreeType(Library):
@classmethod
def getConfigScript(cls, platform, linkStatic, distroRoot):
- if platform in ('netbsd', 'openbsd'):
- if distroRoot == '/usr/local':
- # FreeType is located in the X11 tree, not the ports tree.
- distroRoot = '/usr/X11R6'
+ # let pkgsrc wrappers handle this
+ distroRoot = None
return super(FreeType, cls).getConfigScript(
platform, linkStatic, distroRoot
)