0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 14:56:16 +00:00
termux-packages/x11-packages/tuxpaint/Makefile.patch
2024-07-21 13:27:27 +08:00

103 lines
4.1 KiB
Diff

--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@
MAGIC_API_VERSION:=0x0000000A
# Need to know the OS
-SYSNAME:=$(shell uname -s)
+SYSNAME:=Linux
ifeq ($(findstring MINGW32, $(SYSNAME)),MINGW32)
OS:=windows
GPERF:=/usr/bin/gperf
@@ -188,7 +188,7 @@
macos_ARCH_CFLAGS:=-isysroot $(SDKROOT) -I$(SDKROOT)/usr/include -I$(HOSTROOT)/include -mmacosx-version-min=$(MINVER) -arch $(subst $() $(), -arch ,$(ARCHS)) -w -headerpad_max_install_names -DHAVE_STRCASESTR
ios_ARCH_CFLAGS:=-isysroot $(SDKROOT) -I$(SDKROOT)/usr/include -I$(HOSTROOT)/include $(MINVEROPT) -arch $(subst $() $(), -arch ,$(ARCHS)) -w -fPIC -DHAVE_STRCASESTR -DUNLINK_ONLY
beos_ARCH_CFLAGS:=
-linux_ARCH_CFLAGS:=
+linux_ARCH_CFLAGS:=$(CPPFLAGS) $(CFLAGS)
ARCH_CFLAGS:=$($(OS)_ARCH_CFLAGS)
windows_ARCH_LDFLAGS:=
@@ -196,7 +196,7 @@
macos_ARCH_LDFLAGS:=-isysroot $(SDKROOT) -L$(HOSTROOT)/lib -mmacosx-version-min=$(MINVER) -arch $(subst $() $(), -arch ,$(ARCHS))
ios_ARCH_LDFLAGS:=-isysroot $(SDKROOT) -L$(HOSTROOT)/lib $(MINVEROPT) -arch $(subst $() $(), -arch ,$(ARCHS))
beos_ARCH_LDFLAGS:=
-linux_ARCH_LDFLAGS:=
+linux_ARCH_LDFLAGS:=$(LDFLAGS)
ARCH_LDFLAGS:=$($(OS)_ARCH_LDFLAGS)
LDFLAGS:=$(ARCH_LDFLAGS)
@@ -232,7 +232,7 @@
os2_PREFIX:=c:/extras/tuxpaint
macos_PREFIX:=Resources
ios_PREFIX:=.
-linux_PREFIX:=/usr/local
+linux_PREFIX:=@TERMUX_PREFIX@
PREFIX:=$($(OS)_PREFIX)
# Root directory to place files when creating packages.
@@ -269,7 +269,7 @@
MAGIC_PREFIX:=$(DESTDIR)$(LIBDIR)/lib$(LIBDIRSUFFIX)/tuxpaint/plugins
# Docs and man page:
-DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-$(VER_VERSION)
+DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/tuxpaint/doc
MAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
DEVMAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
@@ -599,7 +599,7 @@
ifeq ($(PACKAGE_ONLY),yes)
linux_ARCH_INSTALL:=install-pkgxdg install-man install-importscript install-bash-completion
else
- linux_ARCH_INSTALL:=install-xdg install-man install-importscript install-bash-completion
+ linux_ARCH_INSTALL:=install-man install-importscript
endif
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
@@ -1142,12 +1142,6 @@
@install -d $(DOC_PREFIX)/en/magic-docs
@cp -R magic/magic-docs/en/* $(DOC_PREFIX)/en/magic-docs/
@echo
- for l in `ls -d man/*.UTF-8 | cut -d '/' -f 2`; do \
- DEST=$(DOC_PREFIX)/$$l/magic-docs ; \
- echo "...Installing $$l Magic tool docs into $$DEST..." ; \
- install -d $$DEST ; \
- cp -R magic/magic-docs/$$l/* $$DEST/ ; \
- done
@chmod -R a=rX,g=rX,u=rwX $(DOC_PREFIX)
@@ -1171,14 +1165,6 @@
@gzip -f $(MAN_PREFIX)/man1/tp-magic-config.1
@chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tp-magic-config.1.gz
@echo
- for l in `ls -d man/*.UTF-8 | cut -d '/' -f 2`; do \
- DEST=$(MAN_PREFIX)/$$l/man1 ; \
- echo "...Installing $$l man pages into $$DEST..." ; \
- install -d $$DEST ; \
- cp man/$$l/tuxpaint.1 $$DEST ; \
- gzip -f $$DEST/tuxpaint.1 ; \
- chmod a+rx,g-w,o-w $$DEST/tuxpaint.1.gz ; \
- done
@# FIXME: The other man pages aren't localizable yet -bjk 2021.08.14
# Install the support files for macOS application bundle
@@ -1468,7 +1454,7 @@
macos_MAGIC_SDL_LIBS:=-L/usr/local/lib $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL2_image -lSDL2_ttf $(SDL_MIXER_LIB)
ios_MAGIC_SDL_LIBS:=$(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL2_image -lSDL2_ttf $(SDL_MIXER_LIB)
beos_MAGIC_SDL_LIBS:=-L/usr/local/lib $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL2_image -lSDL2_ttf $(SDL_MIXER_LIB)
-linux_MAGIC_SDL_LIBS:=-L/usr/local/lib $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL2_image -lSDL2_ttf $(SDL_MIXER_LIB)
+linux_MAGIC_SDL_LIBS:=-L@TERMUX_PREFIX@/lib $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL2_image -lSDL2_ttf $(SDL_MIXER_LIB)
MAGIC_SDL_LIBS:=$($(OS)_MAGIC_SDL_LIBS)
windows_MAGIC_ARCH_LINKS=-lintl $(PNG)
@@ -1484,7 +1470,7 @@
macos_PLUGIN_LIBS:=$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS)
ios_PLUGIN_LIBS:=$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS)
beos_PLUGIN_LIBS:="$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS) $(MAGIC_SDL_CPPFLAGS)"
-linux_PLUGIN_LIBS:=
+linux_PLUGIN_LIBS:=$(MAGIC_SDL_LIBS)
PLUGIN_LIBS:=$($(OS)_PLUGIN_LIBS)
MAGIC_CFLAGS:=-g3 -O2 $(FASTMATH) -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(MAGIC_SDL_CPPFLAGS) -Isrc/ $(ARCH_CFLAGS)