Re: GTKPOD 1.0.0 scripts on FreeBSD current

Hans Petter Selasky <[email protected]> Thu, 19 Jul 2012 12:17:47 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <[email protected]>
Hi,

I have some trouble to get stuff built using cmake. Can someone have a look at 
my attached patches and incorporate them?

--HPS

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Gtkpod-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-devel
libgtkpod.diff (text/x-patch, 5.1 KB)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f6f70a..ce7fedc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ set(PACKAGE ${CMAKE_PROJECT_NAME})
 set(VERSION 1.0.0)
 set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
 set(PACKAGE_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share)
+set(PACKAGE_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
 set(PACKAGE_LOCALE_DIR ${PACKAGE_DATA_DIR}/locale)
 
 option(USE_CLANG "Use clang instead of gcc to compile" OFF)
@@ -33,6 +34,14 @@ if(USE_LOCAL_DATA_FILES)
     set(PACKAGE_DATA_DIR ${CMAKE_SOURCE_DIR})
 endif()
 
+set(GTKPOD_PLUGIN_DIR ${PACKAGE_LIB_DIR}/${PACKAGE})
+set(GTKPOD_DATA_DIR ${PACKAGE_DATA_DIR}/${PACKAGE})
+set(GTKPOD_DOC_DIR ${PACKAGE_DATA_DIR}/${PACKAGE}/doc)
+set(GTKPOD_UI_DIR ${PACKAGE_DATA_DIR}/${PACKAGE}/data/ui)
+set(GTKPOD_GLADE_DIR ${PACKAGE_DATA_DIR}/${PACKAGE}/data/glade)
+set(GTKPOD_IMAGE_DIR ${PACKAGE_DATA_DIR}/icons)
+set(GTKPOD_SCRIPT_DIR ${PACKAGE_DATA_DIR}/${PACKAGE}/scripts)
+
 include(flex)
 include(CheckIncludeFile)
 include(CheckIncludeFiles)
@@ -106,7 +115,9 @@ check_include_file(stdint.h HAVE_STDINT_H)
 
 include_directories(
     ${CMAKE_BINARY_DIR}
+    ${CMAKE_SOURCE_DIR}
     ${CMAKE_SOURCE_DIR}/src
+    ${CMAKE_SOURCE_DIR}/plugins/sorttab_display
     ${GTK2_ALL_INCLUDES}
     ${LIBXML2_INCLUDE_DIR}
     ${GLADE2_INCLUDE_DIRS}
diff --git a/cmake/config.h.in b/cmake/config.h.in
index 9d99fb0..2c11954 100644
--- a/cmake/config.h.in
+++ b/cmake/config.h.in
@@ -51,11 +51,15 @@
 /* Name of package */
 #cmakedefine PACKAGE "@PACKAGE@"
 
-/* Define to the package data directory. */
 #cmakedefine PACKAGE_DATA_DIR "@PACKAGE_DATA_DIR@"
-
-/* Define to the package locale directory. */
 #cmakedefine PACKAGE_LOCALE_DIR "@PACKAGE_LOCALE_DIR@"
+#cmakedefine GTKPOD_PLUGIN_DIR "@GTKPOD_PLUGIN_DIR@"
+#cmakedefine GTKPOD_DATA_DIR "@GTKPOD_DATA_DIR@"
+#cmakedefine GTKPOD_DOC_DIR "@GTKPOD_DOC_DIR@"
+#cmakedefine GTKPOD_UI_DIR "@GTKPOD_UI_DIR@"
+#cmakedefine GTKPOD_GLADE_DIR "@GTKPOD_GLADE_DIR@"
+#cmakedefine GTKPOD_IMAGE_DIR "@GTKPOD_IMAGE_DIR@"
+#cmakedefine GTKPOD_SCRIPT_DIR "@GTKPOD_SCRIPT_DIR@"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
diff --git a/cmake/sources.cmake b/cmake/sources.cmake
index de91314..35fb31b 100644
--- a/cmake/sources.cmake
+++ b/cmake/sources.cmake
@@ -1,53 +1,34 @@
 set(GTKPOD_SOURCES
-    src/autodetection.c
-    src/charset.c
-    src/clientserver.c
-    src/confirmation.c
-    src/context_menus.c
-    src/details.c
-    src/display.c
-    src/display_coverart.c
-    src/display_itdb.c
-    src/display_photo.c
-    src/display_playlists.c
-    src/display_sorttabs.c
-    src/display_spl.c
-    src/display_tracks.c
-    src/fetchcover.c
-    src/file.c
-    src/file_convert.c
-    src/file_export.c
-    src/file_itunesdb.c
-    src/fileselection.c
-    src/flacfile.c
-    src/getopt1.c
-    src/getopt.c
-    src/help.c
-    src/info.c
-    src/infodlg.c
-    src/ipod_init.c
-    src/main.c
-    src/misc.c
-    src/misc_confirm.c
-    src/misc_conversion.c
-    src/misc_input.c
-    src/misc_playlist.c
-    src/misc_track.c
-    src/mp3file.c
-    src/mp4file.c
-    src/oggfile.c
-    src/podcast.c
-    src/prefs.c
-    src/prefsdlg.c
-    src/rb_cell_renderer_rating.c
-    src/rb_rating_helper.c
-    src/repository.c
-    src/sha1.c
-    src/sort_window.c
-    src/stock_icons.c
-    src/syncdir.c
-    src/tools.c
-    src/wavfile.c
+	libgtkpod/autodetection.c
+	libgtkpod/charset.c
+	libgtkpod/clientserver.c
+	libgtkpod/context_menus.c
+	libgtkpod/details_editor_iface.c
+	libgtkpod/directories.c
+	libgtkpod/exporter_iface.c
+	libgtkpod/file.c
+	libgtkpod/file_convert.c
+	libgtkpod/file_itunesdb.c
+	libgtkpod/fileselection.c
+	libgtkpod/filetype_iface.c
+	libgtkpod/gp_itdb.c
+	libgtkpod/gp_private.c
+	libgtkpod/gtkpod_app-marshallers.c
+	libgtkpod/gtkpod_app_iface.c
+	libgtkpod/lyrics_editor_iface.c
+	libgtkpod/misc.c
+	libgtkpod/misc_conversion.c
+	libgtkpod/misc_playlist.c
+	libgtkpod/misc_track.c
+	libgtkpod/photo_editor_iface.c
+	libgtkpod/prefs.c
+	libgtkpod/repository_editor_iface.c
+	libgtkpod/sha1.c
+	libgtkpod/stock_icons.c
+	libgtkpod/syncdir.c
+	libgtkpod/tool_menu_action.c
+	libgtkpod/tools.c
+	libgtkpod/track_command_iface.c
 )
 
-add_flex_files(GTKPOD_SOURCES src/date_parser.l src/date_parser2.l)
+add_flex_files(GTKPOD_SOURCES plugins/sorttab_display/date_parser.l plugins/sorttab_display/date_parser2.l)
diff --git a/libgtkpod/gtkpod_app_iface.c b/libgtkpod/gtkpod_app_iface.c
index 61df6fa..b2ef20e 100644
--- a/libgtkpod/gtkpod_app_iface.c
+++ b/libgtkpod/gtkpod_app_iface.c
@@ -637,7 +637,8 @@ void gtkpod_execute_track_command(GList *tracks) {
         // More than one so see if there is a preference set
         gchar *cmdpref = NULL;
         if (prefs_get_string_value(DEFAULT_TRACK_COMMAND_PREF_KEY, &cmdpref)) {
-            for (gint i = 0; i < g_list_length(gp_iface->track_commands); ++i) {
+	    gint i;
+            for (i = 0; i < g_list_length(gp_iface->track_commands); ++i) {
                 TrackCommand *cmd = g_list_nth_data(gp_iface->track_commands, i);
                 if (cmdpref && g_str_equal(cmdpref, track_command_get_id(cmd))) {
                     track_command_execute(cmd, tracks);