249 lines
10 KiB
Plaintext
249 lines
10 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.12 2021/01/09 14:05:40 ajacoutot Exp $
|
|
|
|
Index: Makefile
|
|
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -52,7 +52,7 @@ else
|
|
endif
|
|
else
|
|
OS:=linux
|
|
- GPERF:=/usr/bin/gperf
|
|
+ GPERF:=${LOCALBASE}/bin/gperf
|
|
endif
|
|
endif
|
|
endif
|
|
@@ -110,7 +110,7 @@ ARCH_LIBS:=$($(OS)_ARCH_LIBS)
|
|
windows_ARCH_CFLAGS:=
|
|
macos_ARCH_CFLAGS:=-mmacosx-version-min=10.8 -isystem /opt/local/include -DHAVE_STRCASESTR -w -headerpad_max_install_names
|
|
beos_ARCH_CFLAGS:=
|
|
-linux_ARCH_CFLAGS:=
|
|
+#linux_ARCH_CFLAGS:=
|
|
ARCH_CFLAGS:=$($(OS)_ARCH_CFLAGS)
|
|
|
|
windows_ARCH_LDFLAGS:=
|
|
@@ -120,9 +120,8 @@ linux_ARCH_LDFLAGS:=
|
|
ARCH_LDFLAGS:=$($(OS)_ARCH_LDFLAGS)
|
|
LDFLAGS:=$(ARCH_LDFLAGS)
|
|
|
|
-PAPER_LIB:=$(call linktest,-lpaper,)
|
|
-PNG:=$(call linktest,-lpng,)
|
|
-PNG:=$(if $(PNG),$(PNG),$(call linktest,-lpng12,))
|
|
+PAPER_LIB:=-lpaper
|
|
+PNG:=$(shell $(PKG_CONFIG) --libs libpng)
|
|
|
|
FRIBIDI_LIB:=$(shell $(PKG_CONFIG) --libs fribidi)
|
|
FRIBIDI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags fribidi)
|
|
@@ -144,7 +143,7 @@ ARCH_HEADERS:=$($(OS)_ARCH_HEADERS)
|
|
windows_PREFIX:=/usr/local
|
|
macos_PREFIX:=Resources
|
|
linux_PREFIX:=/usr/local
|
|
-PREFIX:=$($(OS)_PREFIX)
|
|
+PREFIX:=${TRUEPREFIX}
|
|
|
|
# Root directory to place files when creating packages.
|
|
# PKG_ROOT is the old name for this, and should be undefined.
|
|
@@ -178,19 +177,19 @@ INCLUDE_PREFIX:=$(DESTDIR)$(PREFIX)/include
|
|
MAGIC_PREFIX:=$(DESTDIR)$(LIBDIR)/lib$(LIBDIRSUFFIX)/tuxpaint/plugins
|
|
|
|
# Docs and man page:
|
|
-DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-$(VER_VERSION)
|
|
-DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-$(VER_VERSION)/tuxpaint-dev
|
|
-MAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
|
|
+DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint
|
|
+DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint/tuxpaint
|
|
+MAN_PREFIX:=$(DESTDIR)$(PREFIX)/man
|
|
DEVMAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
|
|
|
|
# BASH tab-completion file:
|
|
-COMPLETIONDIR:=$(DESTDIR)/etc/bash_completion.d
|
|
+COMPLETIONDIR:=$(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
|
|
|
# 'System-wide' Config file:
|
|
ifeq ($(PREFIX),/usr)
|
|
CONFDIR:=$(DESTDIR)/etc/tuxpaint
|
|
else
|
|
- CONFDIR:=$(DESTDIR)$(PREFIX)/etc/tuxpaint
|
|
+ CONFDIR:=${SYSCONFDIR}/tuxpaint
|
|
endif
|
|
|
|
ifeq ($(SYSNAME),Haiku)
|
|
@@ -658,18 +657,16 @@ uninstall: uninstall-i18n
|
|
install-default-config:
|
|
@echo
|
|
@echo "...Installing default config file..."
|
|
- @install -d $(CONFDIR)
|
|
- @cp src/tuxpaint.conf $(CONFDIR)
|
|
- @chmod 644 $(CONFDIR)/tuxpaint.conf
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/examples/tuxpaint
|
|
+ ${BSD_INSTALL_DATA} src/tuxpaint.conf $(DESTDIR)$(PREFIX)/share/examples/tuxpaint
|
|
|
|
# Install BASH completion file:
|
|
.PHONY: install-bash-completion
|
|
install-bash-completion:
|
|
@echo
|
|
@echo "...Installing BASH completion file..."
|
|
- @install -d $(COMPLETIONDIR)
|
|
- @cp src/tuxpaint-completion.bash $(COMPLETIONDIR)
|
|
- @chmod 644 $(COMPLETIONDIR)/tuxpaint-completion.bash
|
|
+ ${BSD_INSTALL_DATA_DIR} $(COMPLETIONDIR)
|
|
+ ${BSD_INSTALL_DATA} src/tuxpaint-completion.bash $(COMPLETIONDIR)/tuxpaint
|
|
|
|
|
|
# Install example stamps
|
|
@@ -677,7 +674,7 @@ install-bash-completion:
|
|
install-example-stamps:
|
|
@echo
|
|
@echo "...Installing example stamps..."
|
|
- @install -d $(DATA_PREFIX)/stamps
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DATA_PREFIX)/stamps
|
|
@cp -R stamps/* $(DATA_PREFIX)/stamps
|
|
@chmod -R a+rX,g-w,o-w $(DATA_PREFIX)/stamps
|
|
|
|
@@ -727,7 +724,10 @@ $(THUMB_STARTERS):
|
|
fi
|
|
|
|
$(INSTALLED_THUMB_STARTERS): $(DATA_PREFIX)/%: %
|
|
- @install -D -m 644 $< $@ || ( echo "NO THUMB $<" )
|
|
+ @cd starters ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/tuxpaint/starters ; \
|
|
+ for i in `ls *.*` ; do \
|
|
+ ${BSD_INSTALL_DATA} $$i $(DESTDIR)$(PREFIX)/share/tuxpaint/starters ; done
|
|
|
|
.PHONY: echo-thumb-starters
|
|
echo-thumb-starters:
|
|
@@ -834,24 +834,22 @@ install-nokia770:
|
|
install-xdg:
|
|
@echo
|
|
@echo "...Installing launcher icon into desktop environment..."
|
|
- @if [ "x$(shell which xdg-icon-resource install)" != "x" ]; then \
|
|
- xdg-icon-resource install --size 192 data/images/icon192x192.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 128 data/images/icon128x128.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 96 data/images/icon96x96.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 64 data/images/icon64x64.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 48 data/images/icon48x48.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 32 data/images/icon32x32.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 22 data/images/icon22x22.png tux4kids-tuxpaint ; \
|
|
- xdg-icon-resource install --size 16 data/images/icon16x16.png tux4kids-tuxpaint ; \
|
|
- fi
|
|
- @if [ "x$(shell which xdg-desktop-menu)" != "x" ]; then \
|
|
- cp src/tuxpaint.desktop ./tux4kids-tuxpaint.desktop ; \
|
|
- xdg-desktop-menu install tux4kids-tuxpaint.desktop ; \
|
|
- rm ./tux4kids-tuxpaint.desktop ; \
|
|
- fi
|
|
- @if [ "x$(shell which update-desktop-database)" != "x" ]; then \
|
|
- update-desktop-database ; \
|
|
- fi
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/192x192/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps ; \
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon192x192.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/192x192/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon128x128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon96x96.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon64x64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon48x48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon32x32.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon22x22.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/tux4kids-tuxpaint.png ; \
|
|
+ ${BSD_INSTALL_DATA} data/images/icon16x16.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/tux4kids-tuxpaint.png ; \
|
|
|
|
# Install the PNG icon (for KDE desktop, etc.)
|
|
# and the 24-color 32x32 XPM (for other Window managers):
|
|
@@ -859,12 +857,9 @@ install-xdg:
|
|
install-icon:
|
|
@echo
|
|
@echo "...Installing launcher icon graphics..."
|
|
- @install -d $(ICON_PREFIX)
|
|
- @cp data/images/icon.png $(ICON_PREFIX)/tuxpaint.png
|
|
- @chmod 644 $(ICON_PREFIX)/tuxpaint.png
|
|
- @install -d $(X11_ICON_PREFIX)
|
|
- @cp data/images/icon32x32.xpm $(X11_ICON_PREFIX)/tuxpaint.xpm
|
|
- @chmod 644 $(X11_ICON_PREFIX)/tuxpaint.xpm
|
|
+ ${BSD_INSTALL_DATA_DIR} $(ICON_PREFIX)
|
|
+ ${BSD_INSTALL_DATA} data/images/icon.png $(ICON_PREFIX)/tuxpaint.png
|
|
+ ${BSD_INSTALL_DATA} data/images/icon32x32.xpm $(ICON_PREFIX)/tuxpaint.xpm
|
|
|
|
|
|
# Install the program:
|
|
@@ -872,9 +867,8 @@ install-icon:
|
|
install-bin:
|
|
@echo
|
|
@echo "...Installing program itself..."
|
|
- @install -d $(BIN_PREFIX)
|
|
- @cp tuxpaint$(EXE_EXT) $(BIN_PREFIX)
|
|
- @chmod a+rx,g-w,o-w $(BIN_PREFIX)/tuxpaint$(EXE_EXT)
|
|
+ ${BSD_INSTALL_DATA_DIR} $(BIN_PREFIX)
|
|
+ ${BSD_INSTALL_PROGRAM} tuxpaint $(BIN_PREFIX)
|
|
|
|
# Install tuxpaint-config and required Windows DLLs into the 'bdist' directory
|
|
.PHONY: install-dlls
|
|
@@ -949,8 +943,7 @@ install-haiku:
|
|
install-importscript:
|
|
@echo
|
|
@echo "...Installing 'tuxpaint-import' script..."
|
|
- @cp src/tuxpaint-import.sh $(BIN_PREFIX)/tuxpaint-import
|
|
- @chmod a+rx,g-w,o-w $(BIN_PREFIX)/tuxpaint-import
|
|
+ ${BSD_INSTALL_SCRIPT} src/tuxpaint-import.sh $(BIN_PREFIX)/tuxpaint-import
|
|
|
|
|
|
# Install the data (sound, graphics, fonts):
|
|
@@ -958,12 +951,14 @@ install-importscript:
|
|
install-data:
|
|
@echo
|
|
@echo "...Installing data files..."
|
|
- @install -d $(DATA_PREFIX)
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DATA_PREFIX)
|
|
@cp -R data/* $(DATA_PREFIX)
|
|
@chmod -R a+rX,g-w,o-w $(DATA_PREFIX)
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(PREFIX)/share/applications
|
|
+ ${BSD_INSTALL_DATA} src/tuxpaint.desktop $(DESTDIR)$(PREFIX)/share/applications
|
|
@echo
|
|
@echo "...Installing fonts..."
|
|
- @install -d $(DATA_PREFIX)/fonts/locale
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DATA_PREFIX)/fonts/locale
|
|
@cp -R fonts/locale/* $(DATA_PREFIX)/fonts/locale
|
|
@chmod -R a+rX,g-w,o-w $(DATA_PREFIX)/fonts/locale
|
|
|
|
@@ -983,7 +978,7 @@ install-osk:
|
|
install-doc:
|
|
@echo
|
|
@echo "...Installing documentation..."
|
|
- @install -d $(DOC_PREFIX)
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DOC_PREFIX)
|
|
@cp -R docs/* $(DOC_PREFIX)
|
|
@# FIXME: Needs improvement, when we add other translations -bjk 2018.08.30
|
|
@install -d $(DOC_PREFIX)/en/magic-docs
|
|
@@ -997,25 +992,13 @@ install-man:
|
|
@echo
|
|
@echo "...Installing man pages..."
|
|
@# man1 directory...
|
|
- @install -d $(MAN_PREFIX)/man1
|
|
+ ${BSD_INSTALL_MAN_DIR} $(MAN_PREFIX)/man1
|
|
@# tuxpaint.1
|
|
- @cp src/manpage/tuxpaint.1 $(MAN_PREFIX)/man1
|
|
- @gzip -f $(MAN_PREFIX)/man1/tuxpaint.1
|
|
- @chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint.1.gz
|
|
- @# pl/man1 directory...
|
|
- @install -d $(MAN_PREFIX)/pl/man1/
|
|
- @# tuxpaint-pl.1
|
|
- @cp src/manpage/tuxpaint-pl.1 $(MAN_PREFIX)/pl/man1/tuxpaint.1
|
|
- @gzip -f $(MAN_PREFIX)/pl/man1/tuxpaint.1
|
|
- @chmod a+rx,g-w,o-w $(MAN_PREFIX)/pl/man1/tuxpaint.1.gz
|
|
+ ${BSD_INSTALL_MAN} src/manpage/tuxpaint.1 $(MAN_PREFIX)/man1
|
|
@# tuxpaint-import.1
|
|
- @cp src/manpage/tuxpaint-import.1 $(MAN_PREFIX)/man1/
|
|
- @gzip -f $(MAN_PREFIX)/man1/tuxpaint-import.1
|
|
- @chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint-import.1.gz
|
|
+ ${BSD_INSTALL_MAN} src/manpage/tuxpaint-import.1 $(MAN_PREFIX)/man1
|
|
@# tp-magic-config.1
|
|
- @cp src/manpage/tp-magic-config.1 $(MAN_PREFIX)/man1/
|
|
- @gzip -f $(MAN_PREFIX)/man1/tp-magic-config.1
|
|
- @chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tp-magic-config.1.gz
|
|
+ ${BSD_INSTALL_MAN} src/manpage/tp-magic-config.1 $(MAN_PREFIX)/man1
|
|
|
|
|
|
# Install the support files for macOS application bundle
|