[shotwell] Remove gphoto 2.4 support
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Remove gphoto 2.4 support
- Date: Tue, 24 May 2016 20:28:52 +0000 (UTC)
commit 3ee6c32d465eb3fb1e5c209a7f3e689d655d601c
Author: Jens Georg <mail jensge org>
Date: Tue May 24 22:17:11 2016 +0200
Remove gphoto 2.4 support
GPhoto 2.5 was released 2012. Time to remove 2.4
Signed-off-by: Jens Georg <mail jensge org>
Makefile | 23 +--
configure | 17 --
src/camera/CameraTable.vala | 12 -
src/camera/GPhoto.vala | 66 +-----
vapi/gphoto-2.4/libgphoto2.vapi | 487 ---------------------------------
vapi/{gphoto-2.5 => }/libgphoto2.vapi | 0
6 files changed, 4 insertions(+), 601 deletions(-)
---
diff --git a/Makefile b/Makefile
index 9cf25dc..2b44a55 100644
--- a/Makefile
+++ b/Makefile
@@ -40,10 +40,6 @@ ifdef UNITY_SUPPORT
VALAFLAGS := $(VALAFLAGS) --define UNITY_SUPPORT
endif
-ifdef WITH_GPHOTO_25
-VALAFLAGS := $(VALAFLAGS) --define WITH_GPHOTO_25
-endif
-
DEFINES := _PREFIX='"$(PREFIX)"' _VERSION='"$(VERSION)"' GETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
_LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"' _LIB='"${LIB}"' _LIBEXECDIR='"$(LIBEXECDIR)"'
@@ -119,17 +115,12 @@ VAPI_FILES = \
LConv.vapi \
libexif.vapi \
libraw.vapi \
- unity.vapi
+ unity.vapi \
+ libgphoto2.vapi
DEPS_FILES = \
unity.deps
-ifdef WITH_GPHOTO_25
-GPHOTO_VAPI_FILE = vapi/gphoto-2.5/libgphoto2.vapi
-else
-GPHOTO_VAPI_FILE = vapi/gphoto-2.4/libgphoto2.vapi
-endif
-
RESOURCE_FILES = \
collection.ui \
direct.ui \
@@ -227,13 +218,6 @@ ICON_FILES = \
VAPI_DIRS = \
./vapi
-ifdef WITH_GPHOTO_25
-VAPI_DIRS += ./vapi/gphoto-2.5
-else
-VAPI_DIRS += ./vapi/gphoto-2.4
-endif
-
-
HEADER_DIRS = \
./vapi
@@ -371,7 +355,6 @@ DIST_FILES = Makefile configure chkver $(EXPANDED_DIST_SRC_FILES) $(EXPANDED_VAP
$(EXPANDED_DOC_PAGES) $(EXPANDED_DOC_IMAGES) $(EXPANDED_DOC_PO) help/Makefile.am \
apport/shotwell.py $(UNIT_RESOURCES) $(UNIT_MKS) \
unitize.mk units.mk $(PC_INPUT) $(PLUGINS_DIST_FILES) \
- vapi/gphoto-2.5/libgphoto2.vapi vapi/gphoto-2.4/libgphoto2.vapi \
$(EXPANDED_THUMBNAILER_SRC_FILES) $(MIGRATOR_BIN)
DIST_TAR = $(PROGRAM)-$(VERSION).tar
@@ -659,7 +642,7 @@ $(UNITIZE_INITS) $(UNITIZE_ENTRIES): $(UNITIZE_STAMP)
@
# EXPANDED_SRC_FILES includes UNITIZE_INITS and UNITIZE_ENTRY
-$(VALA_STAMP): $(EXPANDED_SRC_FILES) $(EXPANDED_VAPI_FILES) $(GPHOTO_VAPI_FILE) $(EXPANDED_SRC_HEADER_FILES)
+$(VALA_STAMP): $(EXPANDED_SRC_FILES) $(EXPANDED_VAPI_FILES) $(EXPANDED_SRC_HEADER_FILES)
$(call check_valac_version)
@echo Compiling Vala code...
@mkdir -p $(BUILD_DIR)
diff --git a/configure b/configure
index da96968..78a07cb 100755
--- a/configure
+++ b/configure
@@ -174,23 +174,6 @@ do
shift
done
-# detect version of libgphoto2 the compilation host has installed
-pkg-config --atleast-version 2.5 libgphoto2
-if [ $? == 1 ]
-then
- pkg-config --atleast-version 2.4 libgphoto2
- if [ $? == 1 ]
- then
- printf "No compatible libGPhoto installation found. Configuration cannot continue.\n";
- exit 1
- else
- printf "Detected libGPhoto 2.4.x - using default code path.\n";
- fi
-else
- printf "Detected libGPhoto 2.5.x - using 2.5-aware code path.\n";
- variables="${variables}WITH_GPHOTO_25=1\n"
-fi
-
rm -f $CONFIG_IN
if [ $variables ]
then
diff --git a/src/camera/CameraTable.vala b/src/camera/CameraTable.vala
index f59dcff..7eb7ae2 100644
--- a/src/camera/CameraTable.vala
+++ b/src/camera/CameraTable.vala
@@ -276,11 +276,7 @@ public class CameraTable {
do_op(camera.gcamera.get_port_info(out port_info),
"retrieve missing camera port information");
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
GPhoto.CameraAbilities abilities;
do_op(camera.gcamera.get_abilities(out abilities), "retrieve camera abilities");
@@ -303,11 +299,7 @@ public class CameraTable {
do_op(camera.gcamera.get_port_info(out port_info),
"retrieve missing camera port information");
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
GPhoto.CameraAbilities abilities;
do_op(camera.gcamera.get_abilities(out abilities), "retrieve missing camera abilities");
@@ -363,11 +355,7 @@ public class CameraTable {
string tmp_path;
do_op(port_info_list.get_info(index, out port_info), "get port info for %s".printf(port));
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
// this should match, every time
assert(port == tmp_path);
diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala
index ac911dd..b16e32b 100644
--- a/src/camera/GPhoto.vala
+++ b/src/camera/GPhoto.vala
@@ -25,8 +25,6 @@ namespace GPhoto {
public virtual void idle() {
}
-#if WITH_GPHOTO_25
-
public virtual void error(string text, void *data) {
}
@@ -75,57 +73,6 @@ namespace GPhoto {
progress_stop();
}
-#else
-
- public virtual void error(string format, void *va_list) {
- }
-
- public virtual void status(string format, void *va_list) {
- }
-
- public virtual void message(string format, void *va_list) {
- }
-
- public virtual void progress_start(float target, string format, void *va_list) {
- }
-
- public virtual void progress_update(float current) {
- }
-
- public virtual void progress_stop() {
- }
-
- private void on_idle(Context context) {
- idle();
- }
-
- private void on_error(Context context, string format, void *va_list) {
- error(format, va_list);
- }
-
- private void on_status(Context context, string format, void *va_list) {
- status(format, va_list);
- }
-
- private void on_message(Context context, string format, void *va_list) {
- message(format, va_list);
- }
-
- private uint on_progress_start(Context context, float target, string format, void *va_list) {
- progress_start(target, format, va_list);
-
- return 0;
- }
-
- private void on_progress_update(Context context, uint id, float current) {
- progress_update(current);
- }
-
- private void on_progress_stop(Context context, uint id) {
- progress_stop();
- }
-
-#endif
}
public class SpinIdleWrapper : ContextWrapper {
@@ -137,19 +84,12 @@ namespace GPhoto {
spin_event_loop();
}
-#if WITH_GPHOTO_25
+
public override void progress_update(float current, void *data) {
base.progress_update(current, data);
spin_event_loop();
}
-#else
- public override void progress_update(float current) {
- base.progress_update(current);
-
- spin_event_loop();
- }
-#endif
}
// For CameraFileInfoFile, CameraFileInfoPreview, and CameraStorageInformation. See:
@@ -187,11 +127,7 @@ namespace GPhoto {
camera.get_port_info(out port_info);
string path;
-#if WITH_GPHOTO_25
port_info.get_path(out path);
-#else
- path = port_info.path;
-#endif
string prefix = "disk:";
if(path.has_prefix(prefix))
diff --git a/vapi/gphoto-2.5/libgphoto2.vapi b/vapi/libgphoto2.vapi
similarity index 100%
rename from vapi/gphoto-2.5/libgphoto2.vapi
rename to vapi/libgphoto2.vapi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]