termux-packages/x11-packages/glew/Makefile.patch
2022-04-18 14:41:45 +05:30

63 lines
1.7 KiB
Diff

diff -uNr glew-2.2.0/config/Makefile.linux glew-2.2.0.mod/config/Makefile.linux
--- glew-2.2.0/config/Makefile.linux 2020-03-15 13:53:59.000000000 +0200
+++ glew-2.2.0.mod/config/Makefile.linux 2020-04-27 17:28:26.386134873 +0300
@@ -1,24 +1,8 @@
NAME = $(GLEW_NAME)
-CC = cc
-LD = cc
-M_ARCH ?= $(shell uname -m)
-ARCH64 = false
-ifeq (x86_64,${M_ARCH})
- ARCH64 = true
-endif
-ifeq (ppc64,${M_ARCH})
- ARCH64 = true
-endif
-ifeq (e2k,${M_ARCH})
- ARCH64 = true
-endif
-ifeq (${ARCH64},true)
- LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
- LIBDIR = $(GLEW_DEST)/lib64
-else
- LDFLAGS.EXTRA = -L/usr/X11R6/lib -L/usr/lib
- LIBDIR = $(GLEW_DEST)/lib
-endif
+CC ?= cc
+LD ?= cc
+LIBDIR = $(GLEW_DEST)/lib
+LDFLAGS.EXTRA = -L@TERMUX_PREFIX@/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
@@ -27,6 +11,7 @@
WARN += -Wshadow
WARN += -pedantic
POPT = -O2
+CFLAGS.EXTRA += -I@TERMUX_PREFIX@/include
CFLAGS.EXTRA += -fPIC
CFLAGS.EXTRA += -Wcast-qual
CFLAGS.EXTRA += -ansi -pedantic
diff -uNr glew-2.2.0/Makefile glew-2.2.0.mod/Makefile
--- glew-2.2.0/Makefile 2020-03-15 13:53:59.000000000 +0200
+++ glew-2.2.0.mod/Makefile 2020-04-27 17:26:37.991266679 +0300
@@ -40,12 +40,12 @@
$(error "Platform '$(SYSTEM)' not supported")
endif
-GLEW_PREFIX ?= /usr
-GLEW_DEST ?= /usr
-BINDIR ?= $(GLEW_DEST)/bin
-LIBDIR ?= $(GLEW_DEST)/lib
-INCDIR ?= $(GLEW_DEST)/include/GL
-PKGDIR ?= $(GLEW_DEST)/lib/pkgconfig
+GLEW_PREFIX = @TERMUX_PREFIX@
+GLEW_DEST = @TERMUX_PREFIX@
+BINDIR = $(GLEW_DEST)/bin
+LIBDIR = $(GLEW_DEST)/lib
+INCDIR = $(GLEW_DEST)/include/GL
+PKGDIR = $(GLEW_DEST)/lib/pkgconfig
ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU)
LIBGLU = glu