diff --git a/sys-libs/glu/glu-9.0.0.recipe b/sys-libs/glu/glu-9.0.0.recipe index cf3384853..c83e4fcec 100644 --- a/sys-libs/glu/glu-9.0.0.recipe +++ b/sys-libs/glu/glu-9.0.0.recipe @@ -5,31 +5,38 @@ COPYRIGHT="Copyright (C) 1999-2012 Brian Paul and others. All Rights Reserved." LICENSE="MIT" SRC_URI="ftp://freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.gz" CHECKSUM_MD5="bbc57d4fe3bd3fb095bdbef6fcb977c4" -REVISION="1" -ARCHITECTURES="x86_gcc2 !x86" +REVISION="2" +ARCHITECTURES="x86_gcc2 x86" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" PROVIDES=" - glu = $portVersion - lib:libGLU = 1.3.1 compat >= 1 + glu$secondaryArchSuffix = $portVersion + lib:libGLU$secondaryArchSuffix = 1.3.1 compat >= 1 " REQUIRES=" - haiku >= $haikuVersion + haiku$secondaryArchSuffix >= $haikuVersion " BUILD_REQUIRES=" + devel:libglapi$secondaryArchSuffix " BUILD_PREREQUIRES=" - haiku_devel >= $haikuVersion - cmd:gcc - cmd:ld + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix cmd:make cmd:sed " -SOURCE_DIR="$portVersionedName" - BUILD() { - runConfigure ./configure + # The Haiku build system builds libGL.so from libglapi and libglu. Since the + # glu build system requires libGL.so (since the shared libglu.so is linked + # against it), we build a dummy libGL.so from libglapi.a. + gcc -o libGL.so -shared -Xlinker --whole-archive -lglapi + libglLinkFlags="-L$(pwd)" + + LDFLAGS="$libglLinkFlags" \ + runConfigure ./configure make $jobArgs } @@ -40,6 +47,10 @@ INSTALL() prepareInstalledDevelLibs libGLU fixPkgconfig + # Remove the additional LDFLAGS from libGLU.la + sed -i "s,^dependency_libs=.*,dependency_libs=' -lGL'," \ + $developLibDir/libGLU.la + # devel package packageEntries devel \ $developDir @@ -47,11 +58,10 @@ INSTALL() # ----- devel package ------------------------------------------------------- -SUMMARY_devel="The glu development files" PROVIDES_devel=" - glu_devel = $portVersion - devel:libGLU = 1.3.1 compat >= 1 + glu${secondaryArchSuffix}_devel = $portVersion + devel:libGLU$secondaryArchSuffix = 1.3.1 compat >= 1 " REQUIRES_devel=" - glu == $portVersion base + glu$secondaryArchSuffix == $portVersion base "