[goobox] ported to meson
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] ported to meson
- Date: Sun, 19 Aug 2018 10:40:56 +0000 (UTC)
commit 6b025aafe214f8cba603f0b80c99665a0f09f6b2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Oct 17 11:17:14 2017 +0200
ported to meson
.cvsignore | 35 ---
.gitignore | 6 +
INSTALL | 291 ---------------------
Makefile.am | 69 -----
README | 10 +-
TODO | 0
add-include-prefix | 1 -
autogen.sh | 39 ---
configure.ac | 270 -------------------
data/.cvsignore | 6 -
data/Makefile.am | 30 ---
data/appdata/Makefile.am | 8 -
data/appdata/meson.build | 8 +
data/appdata/org.gnome.Goobox.appdata.xml.in | 12 +-
data/goobox.convert | 32 ---
data/icons/256x256/Makefile.am | 3 -
data/icons/256x256/apps/Makefile.am | 16 --
data/icons/48x48/Makefile.am | 3 -
data/icons/48x48/apps/Makefile.am | 16 --
data/icons/Makefile.am | 16 --
data/icons/{ => hicolor}/256x256/apps/goobox.png | Bin
data/icons/{ => hicolor}/48x48/apps/goobox.png | Bin
.../scalable/apps/goobox-symbolic.svg | 0
data/icons/meson.build | 1 +
data/icons/scalable/Makefile.am | 3 -
data/icons/scalable/apps/Makefile.am | 16 --
data/meson.build | 26 ++
data/org.gnome.Goobox.desktop.in.in | 4 +-
git.mk | 200 --------------
help/.cvsignore | 3 -
help/C/.cvsignore | 7 -
help/LINGUAS | 12 +
help/Makefile.am | 11 -
help/meson.build | 8 +
m4/.cvsignore | 1 -
meson.build | 75 ++++++
meson_options.txt | 17 ++
po/.cvsignore | 14 -
po/POTFILES.in | 23 +-
po/meson.build | 1 +
src/.cvsignore | 14 -
src/Makefile.am | 112 --------
src/goo-application-actions-callbacks.c | 2 +-
src/goo-window.c | 1 -
src/icons/.cvsignore | 5 -
src/icons/Makefile.am | 17 --
src/icons/reset-16.png | Bin 341 -> 0 bytes
src/icons/reset-24.png | Bin 381 -> 0 bytes
src/meson.build | 94 +++++++
src/ui/.cvsignore | 4 -
src/ui/Makefile.am | 14 -
51 files changed, 274 insertions(+), 1282 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ddd9ba7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*~
+.cproject
+.project
+.settings/
+build/
+po/goobox.pot
diff --git a/README b/README
index aba432c..67ab6f0 100644
--- a/README
+++ b/README
@@ -24,10 +24,12 @@
* How to install
- ./configure
- make
- make install
-
+ mkdir build
+ cd build
+ meson ..
+ ninja
+ ninja install
+
* Licensing
Goobox is released under the terms of the GNU General Public
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
new file mode 100644
index 0000000..44fcbb3
--- /dev/null
+++ b/data/appdata/meson.build
@@ -0,0 +1,8 @@
+i18n.merge_file(
+ input : 'org.gnome.Goobox.appdata.xml.in',
+ output : 'org.gnome.Goobox.appdata.xml',
+ type : 'xml',
+ po_dir : po_dir,
+ install : true,
+ install_dir : join_paths(datadir, 'appdata')
+)
diff --git a/data/appdata/org.gnome.Goobox.appdata.xml.in b/data/appdata/org.gnome.Goobox.appdata.xml.in
index b325a10..7ea94e7 100644
--- a/data/appdata/org.gnome.Goobox.appdata.xml.in
+++ b/data/appdata/org.gnome.Goobox.appdata.xml.in
@@ -5,17 +5,17 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
- <_name>Goobox CD Player</_name>
- <_summary>Play and extract CDs</_summary>
+ <name>Goobox CD Player</name>
+ <summary>Play and extract CDs</summary>
<description>
- <_p>
+ <p>
Goobox allows you to play CDs and save the tracks to disk as mp3, ogg,
flac or wav files.
- </_p>
- <_p>
+ </p>
+ <p>
Track titles and CD covers are set automatically using the
MusicBrainz web service.
- </_p>
+ </p>
</description>
<launchable type="desktop-id">org.gnome.Goobox.desktop</launchable>
diff --git a/data/icons/256x256/apps/goobox.png b/data/icons/hicolor/256x256/apps/goobox.png
similarity index 100%
rename from data/icons/256x256/apps/goobox.png
rename to data/icons/hicolor/256x256/apps/goobox.png
diff --git a/data/icons/48x48/apps/goobox.png b/data/icons/hicolor/48x48/apps/goobox.png
similarity index 100%
rename from data/icons/48x48/apps/goobox.png
rename to data/icons/hicolor/48x48/apps/goobox.png
diff --git a/data/icons/scalable/apps/goobox-symbolic.svg
b/data/icons/hicolor/scalable/apps/goobox-symbolic.svg
similarity index 100%
rename from data/icons/scalable/apps/goobox-symbolic.svg
rename to data/icons/hicolor/scalable/apps/goobox-symbolic.svg
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..6ce8986
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1 @@
+install_subdir('hicolor', install_dir : join_paths(datadir, 'icons'))
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..20e5b11
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,26 @@
+po_dir = join_paths(meson.source_root(), 'po')
+
+gnome.compile_schemas()
+install_data('org.gnome.Goobox.gschema.xml',
+ install_dir : join_paths(datadir, 'glib-2.0', 'schemas')
+)
+
+desktop_data = configuration_data()
+desktop_data.set('VERSION', meson.project_version())
+desktop_in_file = configure_file(
+ input : 'org.gnome.Goobox.desktop.in.in',
+ output : 'org.gnome.Goobox.desktop.in',
+ configuration : desktop_data
+)
+
+i18n.merge_file(
+ input : desktop_in_file,
+ output : 'org.gnome.Goobox.desktop',
+ type : 'desktop',
+ po_dir : po_dir,
+ install : true,
+ install_dir : join_paths(datadir, 'applications')
+)
+
+subdir('appdata')
+subdir('icons')
diff --git a/data/org.gnome.Goobox.desktop.in.in b/data/org.gnome.Goobox.desktop.in.in
index d9fee8c..e1a52f1 100644
--- a/data/org.gnome.Goobox.desktop.in.in
+++ b/data/org.gnome.Goobox.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=CD Player
-_Comment=Play and extract CDs
+Name=CD Player
+Comment=Play and extract CDs
Categories=GNOME;GTK;AudioVideo;Audio;
Encoding=UTF-8
Exec=goobox
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 0000000..c0ec196
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,12 @@
+# please keep this list sorted alphabetically
+#
+ca
+cs
+de
+el
+es
+fr
+oc
+pl
+sl
+sv
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..f388f86
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,8 @@
+gnome.yelp('goobox',
+ sources : [
+ 'index.page',
+ 'legal.xml',
+ 'preferences.page',
+ 'shortcuts.page'
+ ]
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..8871e8b
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,75 @@
+project('goobox', 'c',
+ license : 'GPL2+',
+ version : '3.4.2',
+ meson_version : '>=0.43'
+)
+
+glib_version = '>=2.36'
+gtk_version = '>=3.10.0'
+gstreamer_version = '>=1.0.0'
+musicbrainz_version = '>=5.0.0'
+libcoverart_version = '>=1.0.0'
+libnotify_version = '>=0.4.3'
+
+gnome = import('gnome')
+i18n = import('i18n')
+gettext_package = meson.project_name()
+prefix = get_option('prefix')
+datadir = join_paths(prefix, get_option('datadir'))
+
+# Optional dependencies
+
+if get_option('disable-libcoverart')
+ use_libcoverart = false
+else
+ libcoverart_dep = dependency('libcoverart', version : libcoverart_version, required : false)
+ use_libcoverart = libcoverart_dep.found()
+endif
+
+if get_option('disable-libnotify')
+ use_libnotify = false
+else
+ libnotify_dep = dependency('libnotify', version : libnotify_version, required : false)
+ use_libnotify = libnotify_dep.found()
+endif
+
+# config.h
+
+config_data = configuration_data()
+config_data.set_quoted('GETTEXT_PACKAGE', gettext_package)
+config_data.set_quoted('GOO_LOCALEDIR', join_paths(prefix, get_option('localedir')))
+if get_option('run-in-place')
+ config_data.set_quoted('GOO_UIDIR', join_paths(meson.source_root(), 'src', 'ui'))
+else
+ config_data.set_quoted('GOO_UIDIR', join_paths(datadir, meson.project_name(), 'ui'))
+endif
+config_data.set_quoted('PACKAGE_NAME', meson.project_name())
+config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
+if use_libcoverart
+ config_data.set('HAVE_LIBCOVERART', 1)
+endif
+if use_libnotify
+ config_data.set('ENABLE_NOTIFICATION', 1)
+endif
+config_file = configure_file(output : 'config.h', configuration : config_data)
+config_inc = include_directories('.')
+
+# Subdirectories
+
+subdir('data')
+subdir('help')
+subdir('po')
+subdir('src')
+
+# Summary
+
+summary = [
+ 'configuration summary:',
+ '',
+ ' project: @0@ @1@'.format(meson.project_name(), meson.project_version()),
+ ' prefix: @0@'.format(prefix),
+ ' libcoverart: @0@'.format(use_libcoverart),
+ ' libnotify: @0@'.format(use_libnotify),
+ ''
+]
+message('\n'.join(summary))
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..3d4193a
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,17 @@
+option('run-in-place',
+ type : 'boolean',
+ value : false,
+ description : 'Load ui data from the source tree'
+)
+
+option('disable-libcoverart',
+ type : 'boolean',
+ value : false,
+ description : 'Disable use of libcoverart to fetch CD covers'
+)
+
+option('disable-libnotify',
+ type : 'boolean',
+ value : false,
+ description : 'Disable current track notification'
+)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 888c69b..0190464 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,10 +3,9 @@
# DO NOT EDIT. This file is automatically generated, to
# update the content run the following command:
# sh update-potfiles.sh > POTFILES.in
-[encoding: UTF-8]
data/appdata/org.gnome.Goobox.appdata.xml.in
data/org.gnome.Goobox.desktop.in.in
-[type: gettext/gsettings]data/org.gnome.Goobox.gschema.xml
+data/org.gnome.Goobox.gschema.xml
src/album-info.c
src/album-info.h
src/dlg-cover-chooser.c
@@ -58,13 +57,13 @@ src/preferences.h
src/track-info.c
src/track-info.h
src/typedefs.h
-[type: gettext/glade]src/ui/app-menu.ui
-[type: gettext/glade]src/ui/cover-chooser.ui
-[type: gettext/glade]src/ui/extract.ui
-[type: gettext/glade]src/ui/format-options.ui
-[type: gettext/glade]src/ui/gears-menu.ui
-[type: gettext/glade]src/ui/menus.ui
-[type: gettext/glade]src/ui/message-dialog.ui
-[type: gettext/glade]src/ui/preferences.ui
-[type: gettext/glade]src/ui/properties.ui
-[type: gettext/glade]src/ui/ripper.ui
+src/ui/app-menu.ui
+src/ui/cover-chooser.ui
+src/ui/extract.ui
+src/ui/format-options.ui
+src/ui/gears-menu.ui
+src/ui/menus.ui
+src/ui/message-dialog.ui
+src/ui/preferences.ui
+src/ui/properties.ui
+src/ui/ripper.ui
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..5159141
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package, preset : 'glib')
diff --git a/src/goo-application-actions-callbacks.c b/src/goo-application-actions-callbacks.c
index cc5a14d..fc9cd3d 100644
--- a/src/goo-application-actions-callbacks.c
+++ b/src/goo-application-actions-callbacks.c
@@ -61,7 +61,7 @@ goo_application_activate_about (GSimpleAction *action,
gtk_show_about_dialog (GTK_WINDOW (_gtk_application_get_current_window (GTK_APPLICATION
(user_data))),
"name", _("CD Player"),
- "version", VERSION,
+ "version", PACKAGE_VERSION,
"copyright", _("Copyright \xc2\xa9 2004-2011 Free Software Foundation, Inc."),
"comments", _("Play CDs and save the tracks to disk as files"),
"authors", authors,
diff --git a/src/goo-window.c b/src/goo-window.c
index cdfd12e..aabf3a7 100644
--- a/src/goo-window.c
+++ b/src/goo-window.c
@@ -41,7 +41,6 @@
#include "main.h"
#include "preferences.h"
#include "typedefs.h"
-#include "icons/pixbufs.h"
#define FILES_TO_PROCESS_AT_ONCE 500
#define HIDE_TRACK_LIST N_("Hide _tracks")
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..00c1acd
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,94 @@
+# Dependencies
+
+c_comp = meson.get_compiler('c')
+libm_dep = c_comp.find_library('m')
+thread_dep = dependency('threads')
+glib_dep = dependency('glib-2.0', version : glib_version)
+gthread_dep = dependency('gthread-2.0')
+gtk_dep = dependency('gtk+-3.0', version : gtk_version)
+gstreamer_dep = dependency('gstreamer-1.0', version : gstreamer_version)
+brasero_dep = dependency('libbrasero-media3')
+musicbrainz_dep = dependency('libmusicbrainz5', version : musicbrainz_version)
+libdiscid_dep = dependency('libdiscid')
+
+# C args
+
+c_args = [ '-fPIC', '-DPIC', '-Wl,--as-needed' ]
+if get_option('buildtype').contains('debug')
+ c_args += [ '-DDEBUG' ]
+ test_args = [
+ '-Wall',
+ '-Wcast-align',
+ '-Wtype-limits',
+ '-Wclobbered',
+ '-Wempty-body',
+ '-Wignored-qualifiers',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wpointer-arith',
+ '-Wno-sign-compare',
+ '-Wformat-security'
+ ]
+else
+ c_args += [ '-Wno-deprecated-declarations' ]
+ test_args = [ '-Wall' ]
+endif
+c_args += c_comp.get_supported_arguments(test_args)
+
+# Sources
+
+source_files = files(
+ 'album-info.c',
+ 'dlg-cover-chooser.c',
+ 'dlg-extract.c',
+ 'dlg-preferences.c',
+ 'dlg-properties.c',
+ 'dlg-ripper.c',
+ 'gio-utils.c',
+ 'glib-utils.c',
+ 'gnome-desktop-thumbnail.c',
+ 'gnome-thumbnail-pixbuf-utils.c',
+ 'goo-application.c',
+ 'goo-application-actions-callbacks.c',
+ 'goo-error.c',
+ 'goo-player.c',
+ 'goo-player-bar.c',
+ 'goo-player-info.c',
+ 'goo-window.c',
+ 'goo-window-actions-callbacks.c',
+ 'gth-user-dir.c',
+ 'gtk-file-chooser-preview.c',
+ 'gtk-utils.c',
+ 'main.c',
+ 'metadata.c',
+ 'track-info.c'
+)
+gresource_files = gnome.compile_resources('goo-resources', 'goobox.gresource.xml', c_name : 'goo')
+marshal_files = gnome.genmarshal('goo-marshal', prefix : 'goo_marshal', sources : 'goo-marshal.list' )
+
+# Build targets
+
+executable('goobox',
+ sources : [
+ config_file,
+ source_files,
+ gresource_files,
+ marshal_files
+ ],
+ dependencies : [
+ libm_dep,
+ thread_dep,
+ glib_dep,
+ gthread_dep,
+ gtk_dep,
+ gstreamer_dep,
+ brasero_dep,
+ musicbrainz_dep,
+ libdiscid_dep,
+ libcoverart_dep,
+ libnotify_dep
+ ],
+ include_directories : config_inc,
+ c_args : c_args,
+ install : true
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]