openbsd-ports/x11/emelfm2/patches/patch-Makefile

142 lines
5.0 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.6 2010/10/08 17:12:58 jasper Exp $
--- Makefile.orig Wed Mar 3 12:57:22 2010
+++ Makefile Fri Oct 8 19:08:52 2010
@@ -140,7 +140,7 @@ LIBS_XOBJECTS = $(LIBS_XSOURCES:%.c=$(OBJECTS_DIR)/%.s
LIBS_XDEP_FILES = $(LIBS_XSOURCES:%.c=$(OBJECTS_DIR)/%.deps)
# set up flags
-lCFLAGS = $(CFLAGS)
+lCFLAGS ?= ${CFLAGS}
ifeq ($(USE_LATEST), 1)
#these are redundant now
#lCFLAGS += -DGTK_DISABLE_DEPRECATED
@@ -228,7 +228,7 @@ lLIBS_CFLAGS = -shared -fPIC -DPIC
#setup linking
# -lrt needed for clock_gettime()
-lLIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0 gmodule-2.0) -lrt
+lLIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0 gmodule-2.0)
ifeq ($(USE_FAM),1)
lLIBS += -lfam
endif
@@ -258,7 +258,7 @@ all: $(OBJECTS_DIR) $(BUILD_FILE) $(TARGET) $(LIBS) $(
plugins: $(OBJECTS_DIR)/$(LIBS) $(LIBS_OBJECTS) $(LIBS_XOBJECTS)
-install: all install_plugins
+install: all install_i18n install_plugins
@echo "installing $(TARGET) to prefix '$(PREFIX)'"
@install -d -m 755 $(BIN_DIR)
@install -m 755 $(TARGET) $(BIN_DIR)
@@ -270,8 +270,7 @@ install: all install_plugins
@for file in `ls $(DOCS)/ |grep -v svn |grep -v desktop_environment |grep -v api |grep -v $(TARGET).1`; do \
install -m 644 $(DOCS)/$$file $(DOC_DIR); \
done
- @install -d $(MAN_DIR)
- @install -m 644 $(DOCS)/$(TARGET).1 $(MAN_DIR);
+ @install -m 644 $(DOCS)/$(TARGET).1 $(PREFIX)/man/man1;
# @bzip2 -f $(MAN_DIR)/$(TARGET).1;
@if [ "`grep "#define E2_XDG" $(BUILD_FILE)`" = "#define E2_XDG" ]; then \
@@ -336,7 +335,7 @@ clean_plugins:
$(TARGET): $(OBJECTS)
@echo "linking binary '$(TARGET)'"
- @$(CC) $(LDFLAGS) $(OBJECTS) -o $(TARGET) -Wl,--as-needed $(lLIBS)
+ $(CC) $(LDFLAGS) $(OBJECTS) -o $(TARGET) $(lLIBS)
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@echo "stripping binary '$(TARGET)'"
@@ -346,11 +345,11 @@ endif
$(OBJECTS): $(OBJECTS_DIR)/%.o: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) -c -o $@ $*.c
+ $(CC) $(lCFLAGS) -c -o $@ $*.c
$(LIBS_OBJECTS): $(OBJECTS_DIR)/%.so: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(LDFLAGS) -o $@ $*.c
+ $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(LDFLAGS) -o $@ $*.c
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@strip -g $@
@@ -359,7 +358,7 @@ endif
$(THUMBS_OBJECTS): $(OBJECTS_DIR)/%.so: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(THUMBS_FLAGS) $(LDFLAGS) -o $@ $*.c -Wl,--as-needed $(THUMBS_LIBS)
+ $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(THUMBS_FLAGS) $(LDFLAGS) -o $@ $*.c $(THUMBS_LIBS)
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@strip -g $@
@@ -368,7 +367,7 @@ endif
$(ACL_OBJECTS): $(OBJECTS_DIR)/%.so: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(ACL_FLAGS) $(LDFLAGS) -o $@ $*.c -Wl,--as-needed $(ACL_LIBS)
+ $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(ACL_FLAGS) $(LDFLAGS) -o $@ $*.c $(ACL_LIBS)
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@strip -g $@
@@ -377,7 +376,7 @@ endif
$(TRACKER_OBJECTS): $(OBJECTS_DIR)/%.so: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(TRACKER_FLAGS) $(LDFLAGS) -o $@ $*.c -Wl,--as-needed $(TRACKER_LIBS)
+ $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(TRACKER_FLAGS) $(LDFLAGS) -o $@ $*.c $(TRACKER_LIBS)
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@strip -g $@
@@ -386,7 +385,7 @@ endif
$(VFS_OBJECTS): $(OBJECTS_DIR)/%.so: %.c
@echo "compiling '$*.c'"
- @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(VFS_FLAGS) $(LDFLAGS) -o $@ $*.c -Wl,--as-needed $(VFS_LIBS)
+ $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(VFS_FLAGS) $(LDFLAGS) -o $@ $*.c $(VFS_LIBS)
ifeq ($(STRIP), 1)
ifneq ($(DEBUG), 1)
@strip -g $@
@@ -398,27 +397,27 @@ $(DEP_FILES): $(OBJECTS_DIR)
$(DEP_FILES): $(BUILD_FILE)
$(DEP_FILES): $(OBJECTS_DIR)/%.deps: %.c
@echo "generating '$@'"
- @$(CC) $(lCFLAGS) -MM -o $@ $*.c
+ $(CC) $(lCFLAGS) -MM -o $@ $*.c
#$(LIB_DEP_FILES): $(OBJECTS_DIR)
#$(LIB_DEP_FILES): $(BUILD_FILE)
#$(LIB_DEP_FILES): $(OBJECTS_DIR)/%.deps: %.c
# @echo "generating LIB '$@'"
-# @$(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(lLIB_LIBS) -MM -o $@ $*.c
+# $(CC) $(lCFLAGS) $(lLIBS_CFLAGS) $(lLIB_LIBS) -MM -o $@ $*.c
$(DEPS_FILE): $(BUILD_FILE)
@echo "generating dependencies: '$(DEPS_FILE)'"
@touch $(DEPS_FILE)
- @makedepend -s "# generated dependencies" -f $(DEPS_FILE) -- $(lCFLAGS) -- $(SOURCES)
+ makedepend -s "# generated dependencies" -f $(DEPS_FILE) -- $(lCFLAGS) -- $(SOURCES)
@rm $(DEPS_FILE).bak
$(MO): $(PO_DIR)/%.mo: $(PO_DIR)/%.po
@echo "formatting '$*.po'"
- @$(BIN_MSGFMT) $(PO_DIR)/$*.po -o $@
+ $(BIN_MSGFMT) $(PO_DIR)/$*.po -o $@
#gettext:
i18n:
- @$(BIN_XGETTEXT) $(foreach dir, $(DIRS) $(LIBS) $(OPTLIBS), -D $(dir)) \
+ $(BIN_XGETTEXT) $(foreach dir, $(DIRS) $(LIBS) $(OPTLIBS), -D $(dir)) \
-p ./$(PO_DIR) --from-code=UTF-8 --no-wrap --omit-header -i -F \
--copyright-holder="$(COPYRIGHT)" --keyword=_ --keyword=N_ \
$(foreach file, $(SOURCES) $(HEADERS) $(LIBS_SOURCES) $(LIBS_HEADERS) \
@@ -478,7 +477,7 @@ help:
$(OBJECTS_DIR):
@echo "creating object directories in '$(OBJECTS_DIR)'"
- @mkdir -p $(MKOBJDIRS)
+ mkdir -p $(MKOBJDIRS)
$(OBJECTS_DIR)/$(LIBS):
@echo "creating plugin-object directories in '$(OBJECTS_DIR)'"