freebsd-ports/graphics/grafx2/files/patch-Makefile
Emanuel Haupt 9ad5a41ceb - Update to 2.6
- Use options helpers
2019-01-15 13:17:50 +00:00

53 lines
2.5 KiB
Text

--- Makefile.orig 2019-01-10 08:40:57 UTC
+++ Makefile
@@ -33,25 +33,8 @@
# Compile with OPTIM=0 to disable gcc optimizations, to enable debug.
STRIP = strip
-# Detect GIT revision
-ifeq (true,$(shell git rev-parse --is-inside-work-tree))
- GIT_REVISION = $(shell git rev-list --count 1af8c74f53110e349d8f0d19b14599281913f71f..)
- ifneq (,$(CI_COMMIT_REF_NAME))
- GIT_BRANCH = $(CI_COMMIT_REF_NAME)
- else
- ifneq (,$(TRAVIS_BRANCH))
- GIT_BRANCH = $(TRAVIS_BRANCH)
- else
- GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
- endif
- endif
- ifneq (master,$(GIT_BRANCH))
- GIT_REVISION := $(GIT_REVISION)-$(GIT_BRANCH)
- endif
-else
# outside git repository : get version stored in version.c
GIT_REVISION := $(shell cat version.c | cut -f 2 -d '"')
-endif
REVISION_CACHE = .revision.cache
RES := $(shell if [ ! -f $(REVISION_CACHE) ] || [ "`cat $(REVISION_CACHE)`" != "$(GIT_REVISION)" ] ; then echo "$(GIT_REVISION)" > $(REVISION_CACHE) ; fi )
@@ -88,7 +71,7 @@ TARTRANSFORM = --strip=1 --transform 's,^,grafx2/,g'
# default to gcc compiler
ifeq (default,$(origin CC))
- CC = gcc
+ CC ?= gcc
endif
PKG_CONFIG ?= pkg-config
@@ -973,7 +956,6 @@ install : $(BIN)
test -d $(DESTDIR)$(datadir)/grafx2/fonts || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/fonts
test -d $(DESTDIR)$(datadir)/grafx2/skins || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/skins
test -d $(DESTDIR)$(datadir)/grafx2/scripts || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts
- test -d $(DESTDIR)$(datadir)/grafx2/scripts/libs || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts/libs
test -d $(DESTDIR)$(datadir)/applications || $(MKDIR) $(DESTDIR)$(datadir)/applications
test -d $(DESTDIR)$(datadir)/metainfo || $(MKDIR) $(DESTDIR)$(datadir)/metainfo
test -d $(DESTDIR)$(pixmapdir) || $(MKDIR) $(DESTDIR)$(pixmapdir)
@@ -1012,7 +994,6 @@ uninstall :
$(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples/demo),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples/demo,)
$(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples/brush),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples/brush,)
$(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples,)
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/libs),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/libs,)
$(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts,)
$(if $(wildcard $(DESTDIR)$(datadir)/grafx2),$(RMDIR) $(DESTDIR)$(datadir)/grafx2,)
# Icon and desktop file for debian