summaryrefslogtreecommitdiff
path: root/graphics/shotwell-gtk3/patches
diff options
context:
space:
mode:
authordrochner <drochner>2012-04-11 11:48:30 +0000
committerdrochner <drochner>2012-04-11 11:48:30 +0000
commit505985f69db304fdd48c4eff24bca27c56f24812 (patch)
treeab3a2be79e87f465a77f16af983af2526bb3cbb4 /graphics/shotwell-gtk3/patches
parentb51a6016e6ceb8d7490feb4c03a255b3d3971c2f (diff)
downloadpkgsrc-505985f69db304fdd48c4eff24bca27c56f24812.tar.gz
add shotwell-0.12.1, the new major branch, based on gtk3
Diffstat (limited to 'graphics/shotwell-gtk3/patches')
-rw-r--r--graphics/shotwell-gtk3/patches/patch-aa67
-rw-r--r--graphics/shotwell-gtk3/patches/patch-ab116
2 files changed, 183 insertions, 0 deletions
diff --git a/graphics/shotwell-gtk3/patches/patch-aa b/graphics/shotwell-gtk3/patches/patch-aa
new file mode 100644
index 00000000000..8eda524ff3b
--- /dev/null
+++ b/graphics/shotwell-gtk3/patches/patch-aa
@@ -0,0 +1,67 @@
+$NetBSD: patch-aa,v 1.1.1.1 2012/04/11 11:48:30 drochner Exp $
+
+--- Makefile.orig 2012-03-28 22:35:57.000000000 +0000
++++ Makefile
+@@ -280,7 +280,6 @@ EXT_PKGS = \
+ gstreamer-base-0.10 \
+ gstreamer-pbutils-0.10 \
+ gtk+-3.0 \
+- gudev-1.0 \
+ libexif \
+ libgphoto2 \
+ libsoup-2.4 \
+@@ -316,7 +315,6 @@ EXT_PKG_VERSIONS = \
+ gstreamer-plugins-base-0.10 >= 0.10.32 \
+ gstreamer-pbutils-0.10 >= 0.10.32 \
+ gtk+-3.0 >= 3.0.11 \
+- gudev-1.0 >= 145 \
+ libexif >= 0.6.16 \
+ libgphoto2 >= 2.4.2 \
+ libsoup-2.4 >= 2.26.0 \
+@@ -440,7 +438,7 @@ CFLAGS += -DG_UDEV_API_IS_SUBJECT_TO_CHA
+ # if not available.
+ LIBRAW_CONFIG=./libraw-config
+
+-define check_valac_version
++define xcheck_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 ),)
+@@ -666,7 +664,6 @@ $(UNITIZE_INITS) $(UNITIZE_ENTRIES): $(U
+
+ # EXPANDED_SRC_FILES includes UNITIZE_INITS and UNITIZE_ENTRY
+ $(VALA_STAMP): $(EXPANDED_SRC_FILES) $(EXPANDED_VAPI_FILES) $(EXPANDED_SRC_HEADER_FILES)
+- $(call check_valac_version)
+ @echo Compiling Vala code...
+ @mkdir -p $(BUILD_DIR)
+ @$(VALAC) --ccode --directory=$(BUILD_DIR) --basedir=src \
+@@ -683,10 +680,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) $(CFLAGS) `pkg-config --cflags libraw` -o $@ $<
+
+ $(PROGRAM): $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP) $(THUMBNAILER_BIN)
+- $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(LDFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `$(LIBRAW_CONFIG) --libs` $(EXPORT_FLAGS) -o $@
++ $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `pkg-config --libs libraw` $(EXPORT_FLAGS) -o $@
+ glib-compile-schemas misc
+
+ $(THUMBNAILER_BIN): $(EXPANDED_THUMBNAILER_SRC_FILES)
+@@ -697,7 +694,6 @@ $(PLUGINS_SO) $(EXTRA_PLUGINS_SO): $(PLU
+
+ .PHONY: $(PLUGINS_DIR)
+ $(PLUGINS_DIR): $(PLUGIN_VAPI) $(PLUGIN_HEADER) $(PLUGIN_DEPS)
+- $(call check_valac_version)
+ @$(MAKE) --directory=$@ PLUGINS_VERSION="$(VERSION)" USER_VALAFLAGS="$(USER_VALAFLAGS)" \
+ PLUGIN_CFLAGS="$(PLUGIN_CFLAGS)"
+
+@@ -715,7 +711,7 @@ docs:
+ glade: lib$(PROGRAM).so
+
+ lib$(PROGRAM).so: $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP)
+- $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(LDFLAGS) $(RESOURCES) $(VALA_LDFLAGS) `$(LIBRAW_CONFIG) --libs` $(EXPORT_FLAGS) -shared -o $@
++ $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(RESOURCES) $(VALA_LDFLAGS) $(LDFLAGS) `pkg-config --libs libraw` $(EXPORT_FLAGS) -shared -o $@
+
+ .PHONY: pkgcheck
+ pkgcheck:
diff --git a/graphics/shotwell-gtk3/patches/patch-ab b/graphics/shotwell-gtk3/patches/patch-ab
new file mode 100644
index 00000000000..b9fb10dfb0b
--- /dev/null
+++ b/graphics/shotwell-gtk3/patches/patch-ab
@@ -0,0 +1,116 @@
+$NetBSD: patch-ab,v 1.1.1.1 2012/04/11 11:48:30 drochner Exp $
+
+--- src/camera/CameraTable.vala.orig 2012-03-28 22:35:57.000000000 +0000
++++ src/camera/CameraTable.vala
+@@ -26,7 +26,6 @@ public class CameraTable {
+
+ private static CameraTable instance = null;
+
+- private GUdev.Client client = new GUdev.Client(SUBSYSTEMS);
+ private OneShotScheduler camera_update_scheduler = null;
+ private GPhoto.Context null_context = new GPhoto.Context();
+ private GPhoto.CameraAbilitiesList abilities_list;
+@@ -44,7 +43,6 @@ public class CameraTable {
+ on_update_cameras);
+
+ // listen for interesting events on the specified subsystems
+- client.uevent.connect(on_udev_event);
+ volume_monitor = VolumeMonitor.get();
+ volume_monitor.volume_changed.connect(on_volume_changed);
+ volume_monitor.volume_added.connect(on_volume_changed);
+@@ -105,31 +103,6 @@ public class CameraTable {
+ private string[] get_all_usb_cameras() {
+ string[] cameras = new string[0];
+
+- GLib.List<GUdev.Device> device_list = client.query_by_subsystem(null);
+- foreach (GUdev.Device device in device_list) {
+- string device_file = device.get_device_file();
+- if(
+- // only keep devices that have a non-null device file and that
+- // have both the ID_GPHOTO2 and GPHOTO2_DRIVER properties set
+- (device_file != null) &&
+- (device.has_property("ID_GPHOTO2")) &&
+- (device.has_property("GPHOTO2_DRIVER"))
+- ) {
+- int camera_bus, camera_device;
+- // extract the bus and device IDs from the device file string
+- // TODO: is it safe to parse the absolute path or should we be
+- // smarter and use a regex to only pick up the end of the path?
+- if (device_file.scanf("/dev/bus/usb/%d/%d", out camera_bus, out camera_device) < 2) {
+- critical("get_all_usb_cameras: Failed to scanf device file %s", device_file);
+-
+- continue;
+- }
+- string camera = "usb:%.3d,%.3d".printf(camera_bus, camera_device);
+- debug("USB camera detected at %s", camera);
+- cameras += camera;
+- }
+- }
+-
+ return cameras;
+ }
+
+@@ -206,24 +179,6 @@ public class CameraTable {
+ "/dev/bus/usb/%s".printf(port.substring(4).replace(",", "/")) : null;
+ }
+
+- private string? get_name_for_uuid(string uuid) {
+- foreach (Volume volume in volume_monitor.get_volumes()) {
+- if (volume.get_identifier(VolumeIdentifier.UUID) == uuid) {
+- return volume.get_name();
+- }
+- }
+- return null;
+- }
+-
+- private GLib.Icon? get_icon_for_uuid(string uuid) {
+- foreach (Volume volume in volume_monitor.get_volumes()) {
+- if (volume.get_identifier(VolumeIdentifier.UUID) == uuid) {
+- return volume.get_icon();
+- }
+- }
+- return null;
+- }
+-
+ private void update_camera_table() throws GPhotoError {
+ // need to do this because virtual ports come and go in the USB world (and probably others)
+ GPhoto.PortInfoList port_info_list;
+@@ -313,23 +268,6 @@ public class CameraTable {
+ continue;
+ }
+
+- // Get display name for camera.
+- string path = get_port_path(port);
+- if (null != path) {
+- GUdev.Device device = client.query_by_device_file(path);
+- string serial = device.get_property("ID_SERIAL_SHORT");
+- if (null != serial) {
+- // Try to get the name and icon.
+- display_name = get_name_for_uuid(serial);
+- icon = get_icon_for_uuid(serial);
+- }
+- if (null == display_name) {
+- display_name = device.get_sysfs_attr("product");
+- }
+- if (null == display_name) {
+- display_name = device.get_property("ID_MODEL");
+- }
+- }
+ if (null == display_name) {
+ // Default to GPhoto detected name.
+ display_name = name;
+@@ -367,14 +305,6 @@ public class CameraTable {
+ }
+ }
+
+- private void on_udev_event(string action, GUdev.Device device) {
+- debug("udev event: %s on %s", action, device.get_name());
+-
+- // Device add/removes often arrive in pairs; this allows for a single
+- // update to occur when they come in all at once
+- camera_update_scheduler.after_timeout(UPDATE_DELAY_MSEC, true);
+- }
+-
+ public void on_volume_changed(Volume volume) {
+ camera_update_scheduler.after_timeout(UPDATE_DELAY_MSEC, true);
+ }