games/dangerdeep: fix scons fuckup (a little bit)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

games/dangerdeep: fix scons fuckup (a little bit)

Matthias Kilian
Hi,

the scons tests for detecting libGL are wrong. Make them a little
bit less wrong so they don't fail if there's more than one version
of the libGL shared library installed.

With libGL.so.15.0, libGL.so.16.0, libGL.so.17.0, libGL.so.17.1 in
/usr/X11R6/lib and without the patch, the build fails with:

...
scons: Entering directory `/home/ports/pobj/p2/dangerdeep-0.3.99.3327/dangerdeep-0.4.0_pre3327'
scons: Reading SConscript files ...
Compiling for GNU/Linux Environment (openbsd6)
Using architecture: amd64
sh: test: /usr/X11R6/lib/libGL.so.16.0: unexpected operator/operand
ERROR: no libGL.so detected!
grep: libGL.so*: No such file or directory
GL headers declare glBindProgram, but libGL.so has no such symbol! Ignoring all undefined symbols...
...
c++ -o build/linux/dangerdeep `pkg-config --libs-only-L x11` --unresolved-symbols=ignore-all -Xlinker --unresolved-symbols -Xlinker ignore-all build/linux/subsim.o build/linux/ai.o build/linux/airplane.o build/linux/bitstream.o build/linux/bzip.o build/linux/cfg.o build/linux/coastmap.o build/linux/convoy.o build/linux/countrycodes.o build/linux/credits.o build/linux/date.o build/linux/daysky.o build/linux/depth_charge.o build/linux/event.o build/linux/freeview_display.o build/linux/game.o build/linux/game_editor.o build/linux/gun_shell.o build/linux/height_generator_map.o build/linux/highscorelist.o build/linux/keys.o build/linux/logbook.o build/linux/logbook_display.o build/linux/map_display.o build/linux/message_queue.o build/linux/music.o build/linux/parser.o build/linux/particle.o build/linux/sea_object.o build/linux/sensors.o build/linux/ship.o build/linux/ships_sunk_display.o build/linux/sky.o build/linux/moon.o build/linux/simplex_noise.o build/linux/stars.o build/linux/sonar.o build/linux/sonar_operator.o build/linux/submarine.o build/linux/submarine_interface.o build/linux/sub_bg_display.o build/linux/sub_bridge_display.o build/linux/sub_captainscabin_display.o build/linux/sub_control_popup.o build/linux/sub_ecard_popup.o build/linux/sub_damage_display.o build/linux/sub_gauges_display.o build/linux/sub_ghg_display.o build/linux/sub_kdb_display.o build/linux/sub_periscope_display.o build/linux/sub_recogmanual_display.o build/linux/sub_soldbuch_display.o build/linux/sub_tdc_display.o build/linux/sub_tdc_popup.o build/linux/sub_torpedo_display.o build/linux/sub_torpsetup_display.o build/linux/sub_uzo_display.o build/linux/sub_valves_display.o build/linux/tdc.o build/linux/texts.o build/linux/tone_reproductor.o build/linux/torpedo.o build/linux/torpedo_camera_display.o build/linux/triangulate.o build/linux/user_interface.o build/linux/caustics.o build/linux/water.o build/linux/water_splash.o build/linux/dftdtester/tests.o build/linux/sub_recogmanual_popup.o build/linux/filehelper.o build/linux/widget.o build/linux/frustum.o build/linux/datadirs.o build/linux/global_data.o build/linux/thread.o build/linux/mutex.o build/linux/condvar.o build/linux/log.o -L/usr/lib -L/usr/lib/X11 -L/usr/X11R6/lib -Lbuild/linux -Lsrc -L/usr/local/lib -ldftdmedia -ltinyxml -loglext -lGL -lGLU -lSDL -lSDL_image -lSDL_mixer -lfftw3f -lbz2
c++: error: unsupported option '--unresolved-symbols=ignore-all'
scons: *** [build/linux/dangerdeep] Error 1
...

With the patch it doesn't fail any longer.

ok?


Index: patches/patch-SConstruct
===================================================================
RCS file: /cvs/ports/games/dangerdeep/patches/patch-SConstruct,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-SConstruct
--- patches/patch-SConstruct 7 Jun 2013 03:41:44 -0000 1.1.1.1
+++ patches/patch-SConstruct 12 Jan 2018 19:19:25 -0000
@@ -28,7 +28,7 @@ $OpenBSD: patch-SConstruct,v 1.1.1.1 201
  gllibdir = ''
  for i in gllibdirs:
 - if (os.system('test -f '+i+'libGL.so') == 0):
-+ if (os.system('test -f '+i+'libGL.so*') == 0):
++ if (os.system('ls '+i+' | grep -q ^libGL\\.so') == 0):
  gllibdir = i
  break
  if (gllibdir == ''):