$OpenBSD: patch-Makefile,v 1.4 2011/04/12 21:04:49 landry Exp $ remove gudev requirements fix m4 params, http://trac.yorba.org/ticket/3493 --- Makefile.orig Tue Apr 5 02:35:38 2011 +++ Makefile Tue Apr 5 13:30:06 2011 @@ -18,7 +18,7 @@ LIB=lib -include configure.mk -VALAFLAGS := -g --enable-checking --thread --fatal-warnings $(USER_VALAFLAGS) +VALAFLAGS := -g --enable-checking --thread --fatal-warnings -X -I${LOCALBASE}/include $(USER_VALAFLAGS) DEFINES := _PREFIX='"$(PREFIX)"' _VERSION='"$(VERSION)"' GETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \ _LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"' _LIBDIR='"${LIB}"' @@ -261,7 +261,6 @@ EXT_PKGS = \ gstreamer-0.10 \ gstreamer-base-0.10 \ gtk+-2.0 \ - gudev-1.0 \ libexif \ libgphoto2 \ libsoup-2.4 \ @@ -288,7 +287,6 @@ EXT_PKG_VERSIONS = \ gstreamer-0.10 >= 0.10.28 \ gstreamer-base-0.10 >= 0.10.28 \ gtk+-2.0 >= 2.18.0 \ - gudev-1.0 >= 145 \ libexif >= 0.6.16 \ libgphoto2 >= 2.4.2 \ libsoup-2.4 >= 2.26.0 \ @@ -395,7 +393,6 @@ CFLAGS += -DG_UDEV_API_IS_SUBJECT_TO_CHANGE LIBRAW_CONFIG=./libraw-config define check_valac_version - @ ./chkver min $(VALAC_VERSION) $(MIN_VALAC_VERSION) || ( echo 'Shotwell requires Vala compiler $(MIN_VALAC_VERSION) or greater. You are running' $(VALAC_VERSION) '\b.'; exit 1 ) $(if $(MAX_VALAC_VERSION),\ @ ./chkver max $(VALAC_VERSION) $(MAX_VALAC_VERSION) || ( echo 'Shotwell cannot be built by Vala compiler $(MAX_VALAC_VERSION) or greater. You are running' $(VALAC_VERSION) '\b.'; exit 1 ),) endef @@ -568,15 +565,15 @@ ifdef INSTALL_HEADERS endif $(PC_FILE): $(PC_INPUT) $(MAKE_FILES) - m4 '--define=_VERSION_=$(VERSION)' '--define=_PREFIX_=$(PREFIX)' '--define=_REQUIREMENTS_=$(PLUGIN_PKG_REQS)' \ - '--define=_LIB_=$(LIB)' $< > $@ + m4 '-D_VERSION_=$(VERSION)' '-D_PREFIX_=$(PREFIX)' '-D_REQUIREMENTS_=$(PLUGIN_PKG_REQS)' \ + '-D_LIB_=$(LIB)' $< > $@ $(UNITIZE_STAMP): $(MAKE_FILES) src/unit/rc/UnitInternals.m4 src/unit/rc/unitize_entry.m4 @mkdir -p $(UNITIZE_DIR) @$(foreach group,$(APP_GROUPS),\ - `m4 '--define=_APP_GROUP_=$(group)' '--define=_UNIT_ENTRY_POINTS_=$(foreach nm,$($(group)_UNITS),$(nm).init_entry,)' '--define=_UNIT_TERMINATE_POINTS_=$(foreach nm,$($(group)_UNITS),$(nm).terminate_entry,)' src/unit/rc/unitize_entry.m4 > $(UNITIZE_DIR)/_$(group)_unitize_entry.vala`) + `m4 '-D_APP_GROUP_=$(group)' '-D_UNIT_ENTRY_POINTS_=$(foreach nm,$($(group)_UNITS),$(nm).init_entry,)' '-D_UNIT_TERMINATE_POINTS_=$(foreach nm,$($(group)_UNITS),$(nm).terminate_entry,)' src/unit/rc/unitize_entry.m4 > $(UNITIZE_DIR)/_$(group)_unitize_entry.vala`) @$(foreach nm,$(UNIT_NAMESPACES),\ - `m4 '--define=_UNIT_NAME_=$(nm)' '--define=_UNIT_USES_INITS_=$($(nm)_USES_INITS)' '--define=_UNIT_USES_TERMINATORS_=$($(nm)_USES_TERMINATORS)' src/unit/rc/UnitInternals.m4 > $(UNITIZE_DIR)/_$(nm)Internals.vala`) + `m4 '-D_UNIT_NAME_=$(nm)' '-D_UNIT_USES_INITS_=$($(nm)_USES_INITS)' '-D_UNIT_USES_TERMINATORS_=$($(nm)_USES_TERMINATORS)' src/unit/rc/UnitInternals.m4 > $(UNITIZE_DIR)/_$(nm)Internals.vala`) @touch $@ $(UNITIZE_INITS) $(UNITIZE_ENTRIES): $(UNITIZE_STAMP) @@ -592,7 +589,7 @@ else ifdef EXT_PKGS @pkg-config --print-errors --exists $(EXT_PKGS) $(DIRECT_LIBS_VERSIONS) endif # Check for libraw manually - @$(LIBRAW_CONFIG) --exists=$(LIBRAW_VERSION) + @pkg-config --exists raw endif @ type msgfmt > /dev/null || ( echo 'msgfmt (usually found in the gettext package) is missing and is required to build Shotwell. ' ; exit 1 ) @echo Compiling Vala code... @@ -611,10 +608,10 @@ $(EXPANDED_C_FILES): $(VALA_STAMP) @ $(EXPANDED_OBJ_FILES): %.o: %.c $(CONFIG_IN) Makefile - $(CC) -c $(VALA_CFLAGS) `$(LIBRAW_CONFIG) --cflags` $(CFLAGS) -o $@ $< + $(CC) -c $(VALA_CFLAGS) `pkg-config --cflags raw` $(CFLAGS) -o $@ $< $(PROGRAM): $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP) - $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `$(LIBRAW_CONFIG) --libs` $(EXPORT_FLAGS) -o $@ + $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `pkg-config --libs raw` $(EXPORT_FLAGS) -o $@ $(PLUGINS_SO) $(EXTRA_PLUGINS_SO): $(PLUGINS_DIR) @ @@ -639,5 +636,5 @@ docs: glade: lib$(PROGRAM).so lib$(PROGRAM).so: $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP) - $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `$(LIBRAW_CONFIG) --libs` $(EXPORT_FLAGS) -shared -o $@ + $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `pkg-config --libs raw` $(EXPORT_FLAGS) -shared -o $@