mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
games/glbsp: Fix compile issue.
This commit is contained in:
parent
689873d2fa
commit
18f50f202e
2 changed files with 35 additions and 0 deletions
29
games/glbsp/fltkconf.diff
Normal file
29
games/glbsp/fltkconf.diff
Normal file
|
@ -0,0 +1,29 @@
|
|||
diff -Naur glbsp-2.24-source/Makefile.unx glbsp-2.24-source.patched/Makefile.unx
|
||||
--- glbsp-2.24-source/Makefile.unx 2007-07-25 23:14:34.000000000 -0400
|
||||
+++ glbsp-2.24-source.patched/Makefile.unx 2015-11-26 07:20:52.012999000 -0500
|
||||
@@ -94,9 +94,8 @@
|
||||
|
||||
# ----- GUI PROGRAM ---------------------------------------------
|
||||
|
||||
-FLTK_FLAGS=-I$(FLTK_DIR) -I$(FLTK_DIR)/zlib
|
||||
-FLTK_LIBS=-L$(FLTK_DIR)/lib -lfltk_images -lpng -lz -ljpeg \
|
||||
- -lfltk -lX11 -lXext
|
||||
+FLTK_FLAGS=$(shell fltk-config --cflags)
|
||||
+FLTK_LIBS=$(shell fltk-config --use-images --ldflags)
|
||||
|
||||
## may need: -L/usr/X11R6/lib
|
||||
|
||||
diff -Naur glbsp-2.24-source/nodeview/Makefile.unx glbsp-2.24-source.patched/nodeview/Makefile.unx
|
||||
--- glbsp-2.24-source/nodeview/Makefile.unx 2007-05-21 09:17:03.000000000 -0400
|
||||
+++ glbsp-2.24-source.patched/nodeview/Makefile.unx 2015-11-26 07:23:19.660999000 -0500
|
||||
@@ -7,8 +7,8 @@
|
||||
BIN=nodeview
|
||||
SRC_DIR=nodeview
|
||||
|
||||
-FLTK_CFLAGS=-I/usr/local/lib
|
||||
-FLTK_LIBS=-lfltk_images -lfltk -lX11 -lXext -lpng -ljpeg
|
||||
+FLTK_CFLAGS=$(shell fltk-config --cflags)
|
||||
+FLTK_LIBS=$(shell fltk-config --use-images --ldflags)
|
||||
|
||||
CC=gcc
|
||||
CXX=g++
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# 20151126 bkw: fix build for -current (preparing for 14.2)
|
||||
|
||||
PRGNAM=glbsp
|
||||
VERSION=${VERSION:-2.24}
|
||||
BUILD=${BUILD:-1}
|
||||
|
@ -55,12 +57,16 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Use fltk-config --cflags and --ldflags instead of hardcoded values
|
||||
patch -p1 < $CWD/fltkconf.diff
|
||||
|
||||
# Upstream doesn't build a shared lib, but we will by default.
|
||||
if [ "${STATIC:-no}" != "yes" ]; then
|
||||
patch -p1 < $CWD/dynamic_libglbsp.diff
|
||||
fi
|
||||
|
||||
sed -i "s/-O2/$SLKCFLAGS/" Makefile.unx
|
||||
|
||||
make -f Makefile.unx
|
||||
make -f Makefile.unx install \
|
||||
INSTALL_PREFIX=$PKG/usr \
|
||||
|
|
Loading…
Reference in a new issue