diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0f62c766c..e7bbd9aca 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -18,14 +18,18 @@ jobs: sudo apt update sudo apt build-dep -y ./ #Devscripts for bringing in debuild - sudo apt install devscripts -y + sudo apt install meson ninja-build appstream libpolkit-gobject-1-dev devscripts -y - - name: autogen.sh - run: ./autogen.sh - name: configure - run: ./configure - - name: make - run: make + run: | + mkdir builddir + meson setup builddir + - name: build + run: | + meson compile -C builddir + - name: test + run: | + meson test -C builddir --print-errorlogs - name: debuild run: debuild -B -us -uc - name: install deb diff --git a/.gitignore b/.gitignore index 0385a6430..cf64ae253 100644 --- a/.gitignore +++ b/.gitignore @@ -5,11 +5,11 @@ stamp-* *_timestamp *.omf.out -Makefile -Makefile.in +builddir +meson-logs +meson-private tests/.deps tests/test_gtkpkglist tests/test_rpackage tests/test_rpackagefilter tests/test_rpackageview - diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 12710e39d..000000000 --- a/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# synaptic makefile - -SUBDIRS = data common gtk tests man pixmaps po help doc - -EXTRA_DIST = config.h.in \ - synaptic.spec synaptic-suse.spec synaptic-redhat.spec \ - intltool-extract.in intltool-merge.in intltool-update.in \ - README.debtags FAQ \ - TRANSLATORS README.tasks README.supported \ - po/synaptic.pot po-manual/synaptic-manual.pot - diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 137ce6ec9..000000000 --- a/autogen.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. -test -n "$srcdir" || srcdir=$(dirname "$0") -test -n "$srcdir" || srcdir=. - -olddir=$(pwd) - -cd $srcdir - -(test -f configure.ac) || { - echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" - exit 1 -} - -# shellcheck disable=SC2016 -PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) - -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then - echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 - echo "*** If you wish to pass any to it, please specify them on the" >&2 - echo "*** '$0' command line." >&2 - echo "" >&2 -fi - -intltoolize --force --copy --automake || exit 1 -autoreconf --verbose --force --install || exit 1 - -cd "$olddir" -if [ "$NOCONFIGURE" = "" ]; then - $srcdir/configure "$@" || exit 1 - - if [ "$1" = "--help" ]; then - exit 0 - else - echo "Now type 'make' to compile $PKG_NAME" || exit 1 - fi -else - echo "Skipping configure process." -fi \ No newline at end of file diff --git a/common/Makefile.am b/common/Makefile.am deleted file mode 100644 index fcb10f614..000000000 --- a/common/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ - - -noinst_LIBRARIES = libsynaptic.a - -AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \ - @SYNAPTIC_APP_PATHS@ \ - @GTK_DISABLE_DEPRECATED@ \ - @GTK_CFLAGS@ \ - @VTE_CFLAGS@ \ - @LP_CFLAGS@ \ - @APT_PKG_CFLAGS@ \ - @RPM_HDRS@ \ - @DEB_HDRS@ - -libsynaptic_a_SOURCES =\ - rconfiguration.cc\ - rconfiguration.h\ - rinstallprogress.cc\ - rinstallprogress.h\ - rpackage.cc\ - rpackage.h\ - rpackagestatus.cc\ - rpackagestatus.h\ - rpackagecache.cc\ - rpackagecache.h\ - rpackagefilter.cc\ - rpackagefilter.h\ - rpackagelister.cc\ - rpackagelister.h\ - rpackageview.cc\ - rpackageview.h\ - rcdscanner.cc\ - rcdscanner.h\ - rpmindexcopy.cc \ - rpmindexcopy.h \ - raptoptions.cc \ - raptoptions.h\ - rsources.cc \ - rsources.h \ - rcacheactor.cc \ - rcacheactor.h \ - rpackagelistactor.cc \ - rpackagelistactor.h \ - rtagcollbuilder.cc \ - rtagcollbuilder.h \ - i18n.h \ - sections_trans.h \ - rtagcollfilter.cc \ - rtagcollfilter.h \ - ruserdialog.h \ - ruserdialog.cc \ - sections_trans.h \ - sections_trans.cc - - diff --git a/common/meson.build b/common/meson.build new file mode 100644 index 000000000..dada45930 --- /dev/null +++ b/common/meson.build @@ -0,0 +1,33 @@ +common_sources = files( + 'rconfiguration.cc', + 'rinstallprogress.cc', + 'rpackage.cc', + 'rpackagestatus.cc', + 'rpackagecache.cc', + 'rpackagefilter.cc', + 'rpackagelister.cc', + 'rpackageview.cc', + 'rcdscanner.cc', + 'rpmindexcopy.cc', + 'raptoptions.cc', + 'rsources.cc', + 'rcacheactor.cc', + 'rpackagelistactor.cc', + 'rtagcollbuilder.cc', + 'rtagcollfilter.cc', + 'ruserdialog.cc', + 'sections_trans.cc', +) + +libsynaptic = static_library( + 'synaptic', + common_sources, + cpp_args: base_cpp_args + rpm_compile_args, + dependencies: common_deps, + include_directories: [root_inc, common_inc], +) + +libsynaptic_dep = declare_dependency( + link_with: libsynaptic, + include_directories: [root_inc, common_inc], +) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 8d5c001aa..000000000 --- a/configure.ac +++ /dev/null @@ -1,242 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(synaptic, 0.91.7) - -AM_INIT_AUTOMAKE([subdir-objects -Wno-portability]) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE - -dnl Checks for programs. -AC_ISC_POSIX -AC_PROG_CC -AM_PROG_CC_STDC -AC_PROG_CXX -AC_PROG_MAKE_SET -AC_PROG_RANLIB - -dnl generated with: cd po;for i in $(ls *.po); do echo -n "${i%%.po} "; done -dnl i18n -ALL_LINGUAS="af am ar ast az be@latin be bg bn bo br bs ca ca@valencia ckb crh csb cs cy da de_DE de dv el en_AU en_CA en_GB eo es et eu fa fil fi fo fr fur fy ga gl gu gv he hi hr ht hu hy ia id is it ja ka km kn ko ku ky la lo lt lv mk ml mr ms my nb nds ne nl_NL nl nn no oc pa pl ps pt_BR pt pt_PT qu ro ru sc si sk sl sq sr@Latn sr sv ta_LK ta te tet th tl tr tt ug uk ur uz vi xh zh_CN zh_HK zh_TW" -AM_GLIB_GNU_GETTEXT -GETTEXT_PACKAGE=synaptic -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[description]) -AC_PROG_INTLTOOL([0.23]) - -dnl we build for gtk3 by default now -pkg_modules="gtk+-3.0 >= 3.4.0, pango >= 1.0.0, glib-2.0" -vte_modules="vte-2.91 >= 0.5" - -PKG_CHECK_MODULES(GTK, [$pkg_modules]) -BUILD_gtk="gtk" - -AC_SUBST(GTK_CFLAGS) -AC_SUBST(GTK_LIBS) -AC_SUBST(BUILD_gtk) - -if test x"$GTK" = xno; then - AC_MSG_ERROR([ Gtk is not installed, you need to install it to get a GUI]) -fi -dnl fi - - - - -dnl Check for rpm version -dnl ===================== -rpm_version="none" -AC_MSG_CHECKING(RPM version) -SAVE_LIBS="$LIBS" -SAVE_CPPFLAGS="$CPPFLAGS" - -RPM_HDRS="" -LIBS="$SAVE_LIBS -lrpmio -lrpmdb -lpopt" -CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" -AC_CHECK_HEADER(rpm/rpmlib.h, - [AC_CHECK_LIB(rpm,rpmdbInitIterator, - [AC_DEFINE(HAVE_RPM, 1, [whether RPM is present]) - RPM_LIBS="-lrpm -lrpmio -lrpmdb -lpopt" - SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" - RPM_HDRS="-I/usr/include/rpm" - rpm_version="4"])]) - -if test $rpm_version = "none"; then -LIBS="$SAVE_LIBS -lpopt" -CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" -AC_CHECK_HEADER(rpm/rpmlib.h, - [AC_CHECK_LIB(rpm,rpmdbOpen, - [AC_DEFINE(HAVE_RPM, 1, [wheter RPM is present]) - RPM_LIBS="-lrpm -lpopt" - SAVE_CPPFLAGS="$SAVE_CPPFLAGS -I/usr/include/rpm" - RPM_HDRS="-I/usr/include/rpm" - rpm_version="3"])]) -fi - -AC_SUBST(RPM_LIBS) -AC_SUBST(RPM_HDRS) -CPPFLAGS="$SAVE_CPPFLAGS" -LIBS="$SAVE_LIBS" -AC_MSG_RESULT("RPM version is $rpm_version") - -AC_MSG_CHECKING(for --enable-scripts) -AC_ARG_ENABLE([scripts], - AC_HELP_STRING(--enable-scripts, enable the extension system), - [enable_scripts="$enableval"],[enable_scripts="no"]) -if test "$enable_scripts" != "no"; then - AC_MSG_RESULT(no) - AC_DEFINE(WITH_LUA, 1, - [Define if you want to enable the extension system.]) -else - AC_MSG_RESULT(yes) -fi -AM_CONDITIONAL(WITH_LUA, test "$enable_scripts" != "no") - -DEB_HDRS="" -AC_SUBST(DEB_HDRS) -AC_CHECK_LIB(apt-inst, main, [DEB_LIBS=-lapt-inst], [DEB_LIBS=]) -AC_SUBST(DEB_LIBS) - -dnl Checks for header files. -AC_CHECK_HEADERS(unistd.h libintl.h iconv.h) - -AC_LANG([C++]) - -# Look for apt-pkg: -PKG_CHECK_MODULES([APT_PKG], [apt-pkg]) -AC_SUBST([APT_PKG_CFLAGS]) -AC_SUBST([APT_PKG_LIBS]) - -# if metaindex is there we use a apt with authentication support -AC_CHECK_HEADER(apt-pkg/metaindex.h, AC_DEFINE(WITH_APT_AUTH, 1, [build with apt auth support])) - -# check if we have apts new-style cdrom.h -AC_CHECK_HEADER(apt-pkg/cdrom.h, AC_DEFINE(HAVE_APTPKG_CDROM, 1, [whether apt-pkg/cdrom.h is present]) ) - -# xapian based package search feature -AC_CHECK_PROG(HAVE_XAPIAN,xapian-config,yes,no) -AS_IF([test "x$HAVE_XAPIAN" = "xyes"],[ - XAPIAN_CXXFLAGS="$(xapian-config --cxxflags)" - XAPIAN_LIBS="$(xapian-config --libs)" - AC_DEFINE(HAVE_XAPIAN, 1, [xapian based package search feature]) - ]) - -AC_SUBST(XAPIAN_CXXFLAGS) -AC_SUBST(XAPIAN_LIBS) - -AC_LANG([C]) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE - -dnl Checks for library functions. -AC_FUNC_STRCOLL -AC_CHECK_FUNCS(regcomp strdup iconv) - -# use vte if available -# vte_module is set above in the gtk3 test -PKG_CHECK_MODULES(VTE, [$vte_modules], - [AC_DEFINE(HAVE_VTE, 1, [build with VTE as output terminal]) - AC_DEFINE(HAVE_TERMINAL, 1, [build with a terminal widget]) - AC_SUBST(VTE_CFLAGS) - AC_SUBST(VTE_LIBS) - ], - [AC_MSG_NOTICE([no vte found, building without]) - ]) - -# use dpkg progress by default unless the user disables it -AC_ARG_WITH(dpkg-progress, - [ --without-dpkg-progress build without support for dpkg progress bar], - [], - [with_dpkg_progress=yes]) -# if dpkg-progress is used, we need vte, so check that here -# (FIXME: is this actually true? we could build without terminal and progress -# bar only) -AS_IF([test "x$with_dpkg_progress" != xno], - [PKG_CHECK_MODULES(VTE, [$vte_modules], - [], - [AC_MSG_FAILURE([dpkg-progress requires vte, you can build without vte when using --without-dpkg-progress]) - ]) - AC_DEFINE(WITH_DPKG_STATUSFD, 1, [build with dpkg progress bar]) - ], - []) - -# launchpad integration -AC_ARG_WITH(launchpad-integration, - [ --with-launchpad-integration build with launchpad-integration], - [PKG_CHECK_MODULES(LP, ["launchpad-integration"]) - AC_DEFINE(WITH_LAUNCHPAD_INTEGRATION, 1, [build with launchpad-integration]) - AC_SUBST(LP_CFLAGS) - AC_SUBST(LP_LIBS) - ] -) - -# IDEs and code analisys tools need to know about the externally defined symbols, -# so, for those scenarios, here those are added to the config.h file with default values. -# Otherwise they're injected at build time (through the -D command line arguments in the makefiles). -AC_ARG_ENABLE(ide-integration, [ --enable-ide-integration: Define default values in config.h for the injected symbols for the IDEs and code analisys tools.]) -AS_IF([test "x$enable_ide_integration" = "xyes"], - [ - # These default values define relative paths to the current folder (i.e., where the executable is). - AC_DEFINE(PACKAGE_DATA_DIR, "./share", Default value for the IDEs and code analisys tools.) - AC_DEFINE(PACKAGE_LOCALE_DIR, "./share/locale", Default value for the IDEs and code analisys tools.) - AC_DEFINE(SYNAPTICSTATEDIR, "./var", Default value for the IDEs and code analisys tools.) - AC_DEFINE(SYNAPTIC_GTKBUILDERDIR, "./gtkbuilder/", Default value for the IDEs and code analisys tools.) - AC_DEFINE(SYNAPTIC_PIXMAPDIR, "./pixmaps/", Default value for the IDEs and code analisys tools.) - ], - [ - # The paths defined here are replaced at make time by the standard values (as defined by GNU for the "Variables for Installation Directories"). - # They can be adjusted by passing the --prefix option to autogen. - AC_SUBST(SYNAPTIC_APP_PATHS,'-DPACKAGE_DATA_DIR=\""${datadir}"\" -DPACKAGE_LOCALE_DIR=\""${localedir}"\" -DSYNAPTICSTATEDIR=\""${localstatedir}"\" -DSYNAPTIC_GTKBUILDERDIR=\""${datadir}/synaptic/gtkbuilder/"\" -DSYNAPTIC_PIXMAPDIR=\""${datadir}/synaptic/pixmaps/"\"') - ] -) - -AC_ARG_WITH(pkg-hold, - [ --with-pkg-hold: Build with experimental package "hold" feature], - AC_DEFINE(SYNAPTIC_PKG_HOLD, 1, [build with package pin feature]) -) - -AC_ARG_ENABLE(gtk-deprecated, - [ --enable-gtk-deprecated: Build without setting -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED], - [], - [AC_SUBST(GTK_DISABLE_DEPRECATED,["-DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"])] -) - -#use multiarch unless the user disables it -AC_ARG_WITH(apt-multiarch-support, - [ --without-apt-multiarch-support build without support for apt multiarch], - [], [with_apt_multiarch_support=yes]) -AS_IF([test "x$with_apt_multiarch_support" != "xno"], - [AC_DEFINE(WITH_APT_MULTIARCH_SUPPORT, 1, [build with multiarch])] - ) - -AS_IF([dpkg-vendor --derives-from ubuntu], - [AC_DEFINE(VENDOR_DERIVES_FROM_UBUNTU, 1, [vendor derives from ubuntu])] - ) -AC_OUTPUT([ -tests/Makefile -common/Makefile -gtk/Makefile -gtk/gtkbuilder/Makefile -data/Makefile -man/Makefile -pixmaps/Makefile -pixmaps/hicolor/Makefile -pixmaps/hicolor/16x16/actions/Makefile -pixmaps/hicolor/24x24/actions/Makefile -pixmaps/hicolor/256x256/apps/Makefile -pixmaps/hicolor/scalable/apps/Makefile -po/Makefile.in -help/Makefile -help/C/Makefile -help/es/Makefile -help/hr/Makefile -help/sv/Makefile -doc/Makefile -doc/html/Makefile -doc/html/C/Makefile -doc/html/es/Makefile -doc/html/sv/Makefile -Makefile -],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) - - diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index d8521fbc1..000000000 --- a/data/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -@INTLTOOL_DESKTOP_RULE@ -@INTLTOOL_POLICY_RULE@ -@INTLTOOL_XML_RULE@ - -desktopdir = $(datadir)/applications -desktop_in_files = synaptic.desktop.in -desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) - -polkit_policydir = $(datadir)/polkit-1/actions -dist_polkit_policy_in_files = com.ubuntu.pkexec.synaptic.policy.in -dist_polkit_policy_DATA = $(dist_polkit_policy_in_files:.policy.in=.policy) - -metainfodir = $(datadir)/metainfo -metainfo_in_files = io.github.mvo5.synaptic.metainfo.xml.in -metainfo_DATA = $(metainfo_in_files:.xml.in=.xml) - -EXTRA_DIST = $(desktop_in_files) \ - $(desktop_DATA) \ - $(dist_polkit_policy_in_files) \ - $(metainfo_in_files) \ - $(metainfo_DATA) diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 000000000..1c68771f4 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,26 @@ +i18n.merge_file( + input: 'synaptic.desktop.in', + output: 'synaptic.desktop', + po_dir: join_paths(meson.project_source_root(), 'po'), + type: 'desktop', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications'), +) + +i18n.merge_file( + input: 'com.ubuntu.pkexec.synaptic.policy.in', + output: 'com.ubuntu.pkexec.synaptic.policy', + po_dir: join_paths(meson.project_source_root(), 'po'), + type: 'xml', + install: true, + install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions'), +) + +i18n.merge_file( + input: 'io.github.mvo5.synaptic.metainfo.xml.in', + output: 'io.github.mvo5.synaptic.metainfo.xml', + po_dir: join_paths(meson.project_source_root(), 'po'), + type: 'xml', + install: true, + install_dir: join_paths(get_option('datadir'), 'metainfo'), +) diff --git a/debian/control b/debian/control index 4640a985d..08d9f64cb 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: synaptic Section: admin Priority: optional Maintainer: Michael Vogt -Build-Depends: debhelper-compat (= 12), libapt-pkg-dev, gettext, libgtk-3-dev, libvte-2.91-dev, intltool, xmlto, libsm-dev , sharutils, lsb-release, libxapian-dev +Build-Depends: debhelper-compat (= 12), gettext, meson, ninja-build, libapt-pkg-dev, libgtk-3-dev, libvte-2.91-dev, libsm-dev, lsb-release, libxapian-dev Build-Conflicts: librpm-dev Standards-Version: 4.5.0 Vcs-Git: https://github.com/mvo5/synaptic.git diff --git a/debian/rules b/debian/rules index e8befec43..7c6f7c901 100755 --- a/debian/rules +++ b/debian/rules @@ -4,19 +4,15 @@ DIST = $(shell lsb_release -i -s) DHFLAGS=--parallel -CONFIGURE_FLAGS= --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --localstatedir=/var/lib/synaptic \ - --sysconfdir=/etc \ - --with-pkg-hold \ - $(MULTIARCH) +MESON_FLAGS= --prefix=/usr \ + --localstatedir=/var/lib/synaptic \ + -Dpkg_hold=true %: - dh $@ $(DHFLAGS) + dh $@ $(DHFLAGS) --buildsystem=meson --without autoreconf --without autotools-dev override_dh_auto_configure: - dh_auto_configure $(DHFLAGS) -- $(CONFIGURE_FLAGS) + dh_auto_configure $(DHFLAGS) -- $(MESON_FLAGS) override_dh_auto_install: dh_auto_install $(DHFLAGS) @@ -29,14 +25,3 @@ override_dh_auto_install: override_dh_installman: dh_installman -psynaptic man/synaptic.es.8 man/synaptic.fr.8 man/synaptic.hr.8 man/synaptic.ja.8 man/synaptic.pt_BR.8 man/synaptic.ru.8 man/synaptic.tr.8 - -# patch -override_dh_auto_build: - dh_auto_build $(DHFLAGS) - # ubuntu specific for universe langpacks but will not do any - # harm on debian - make -C po synaptic.pot - -# unpatch -override_dh_auto_clean: - dh_auto_clean $(DHFLAGS) diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 95721fb9e..000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = html - diff --git a/doc/README b/doc/README deleted file mode 100644 index faaf26e0e..000000000 --- a/doc/README +++ /dev/null @@ -1,2 +0,0 @@ -the content of this directory is automatically generated from the -help/ directory. diff --git a/doc/html/C/Makefile.am b/doc/html/C/Makefile.am deleted file mode 100644 index 4903fb071..000000000 --- a/doc/html/C/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -htmldir = $(datadir)/synaptic/html -html_DATA = *.html - -htmlfiguresdir = $(htmldir)/figures -htmlfigures_DATA = figures/* - -EXTRA_DIST = $(html_DATA) $(htmlfigures_DATA) diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am deleted file mode 100644 index f843ed1e7..000000000 --- a/doc/html/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS=C es sv diff --git a/doc/html/es/Makefile.am b/doc/html/es/Makefile.am deleted file mode 100644 index f10d0c49c..000000000 --- a/doc/html/es/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# we don't distribute the html version of the spanish documentation for now - -#htmldir = $(datadir)/synaptic/html -#html_DATA = *.html - -#htmlfiguresdir = $(htmldir)/figures -#htmlfigures_DATA = figures/* - -#EXTRA_DIST = $(html_DATA) $(htmlfigures_DATA) diff --git a/doc/html/sv/Makefile.am b/doc/html/sv/Makefile.am deleted file mode 100644 index fd98f729b..000000000 --- a/doc/html/sv/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -# no html version yet, this needs to get fixed (or html killed entirely) diff --git a/gtk/Makefile.am b/gtk/Makefile.am deleted file mode 100644 index fb2c18348..000000000 --- a/gtk/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -SUBDIRS = gtkbuilder - - -AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \ - @SYNAPTIC_APP_PATHS@ \ - @GTK_DISABLE_DEPRECATED@ \ - @GTK_CFLAGS@ \ - @VTE_CFLAGS@ \ - @LP_CFLAGS@ \ - @APT_PKG_CFLAGS@ - -bin_PROGRAMS = synaptic - -#synaptic_LDFLAGS= --export-dynamic - -synaptic_LDADD = \ - ${top_builddir}/common/libsynaptic.a \ - @RPM_LIBS@ \ - @DEB_LIBS@ \ - @GTK_LIBS@ \ - @VTE_LIBS@ \ - @LP_LIBS@ \ - @APT_PKG_LIBS@ \ - @XAPIAN_LIBS@ \ - -lpthread \ - -lutil \ - -lX11 - -synaptic_SOURCES= \ - gsynaptic.cc\ - gtkpkglist.cc\ - gtkpkglist.h\ - rgcacheprogress.cc\ - rgcacheprogress.h\ - rgpkgcdrom.cc \ - rgpkgcdrom.h \ - rgpreferenceswindow.cc\ - rgpreferenceswindow.h\ - rgfetchprogress.cc\ - rgfetchprogress.h\ - rgfiltermanager.cc\ - rgfiltermanager.h\ - rgfindwindow.cc\ - rgfindwindow.h\ - rgiconlegend.h\ - rgiconlegend.cc\ - rglogview.cc\ - rglogview.h\ - rgutils.cc\ - rgutils.h\ - rgpackagestatus.cc\ - rgpackagestatus.h\ - rgsetoptwindow.cc\ - rgsetoptwindow.h\ - rgdummyinstallprogress.cc\ - rgdummyinstallprogress.h\ - rgdebinstallprogress.cc\ - rgdebinstallprogress.h\ - rgterminstallprogress.cc\ - rgterminstallprogress.h\ - rginstallprogress.cc\ - rginstallprogress.h\ - rgslideshow.cc\ - rgslideshow.h\ - rgtaskswin.cc\ - rgtaskswin.h\ - rgcdscanner.cc\ - rgcdscanner.h\ - rgmainwindow.cc\ - rgmainwindow.h\ - rgpkgdetails.cc \ - rgpkgdetails.h \ - rgrepositorywin.cc\ - rgrepositorywin.h\ - rgsummarywindow.cc\ - rgsummarywindow.h\ - rgchangelogdialog.cc\ - rgchangelogdialog.h\ - rgchangeswindow.cc\ - rgchangeswindow.h\ - rguserdialog.cc\ - rguserdialog.h\ - rgwindow.cc\ - rgwindow.h\ - rggtkbuilderwindow.cc\ - rggtkbuilderwindow.h\ - rgpkgtreeview.cc\ - rgpkgtreeview.h - -CLEANFILES= $(wildcard *_wrap.*) $(wildcard *~) - diff --git a/gtk/gtkbuilder/Makefile.am b/gtk/gtkbuilder/Makefile.am deleted file mode 100644 index 3a9aa0aa4..000000000 --- a/gtk/gtkbuilder/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -gtkbuilderdir = $(datadir)/synaptic/gtkbuilder/ -gtkbuilder_DATA = $(srcdir)/*.ui -EXTRA_DIST = $(gtkbuilder_DATA) diff --git a/gtk/meson.build b/gtk/meson.build new file mode 100644 index 000000000..aa1af56ec --- /dev/null +++ b/gtk/meson.build @@ -0,0 +1,77 @@ +gtk_sources = files( + 'gsynaptic.cc', + 'gtkpkglist.cc', + 'rgcacheprogress.cc', + 'rgpkgcdrom.cc', + 'rgpreferenceswindow.cc', + 'rgfetchprogress.cc', + 'rgfiltermanager.cc', + 'rgfindwindow.cc', + 'rgiconlegend.cc', + 'rglogview.cc', + 'rgutils.cc', + 'rgpackagestatus.cc', + 'rgsetoptwindow.cc', + 'rgdummyinstallprogress.cc', + 'rgdebinstallprogress.cc', + 'rgterminstallprogress.cc', + 'rginstallprogress.cc', + 'rgslideshow.cc', + 'rgtaskswin.cc', + 'rgcdscanner.cc', + 'rgmainwindow.cc', + 'rgpkgdetails.cc', + 'rgrepositorywin.cc', + 'rgsummarywindow.cc', + 'rgchangelogdialog.cc', + 'rgchangeswindow.cc', + 'rguserdialog.cc', + 'rgwindow.cc', + 'rggtkbuilderwindow.cc', + 'rgpkgtreeview.cc', +) + +executable( + 'synaptic', + gtk_sources, + install: true, + install_dir: get_option('bindir'), + cpp_args: base_cpp_args + gtk_cpp_args + rpm_compile_args, + dependencies: gui_deps, + include_directories: [root_inc, common_inc, gtk_inc], + link_with: libsynaptic, +) + +install_data( + files( + 'gtkbuilder/dialog_authentication.ui', + 'gtkbuilder/dialog_changelog.ui', + 'gtkbuilder/dialog_change_version.ui', + 'gtkbuilder/dialog_conffile.ui', + 'gtkbuilder/dialog_quit.ui', + 'gtkbuilder/dialog_task_descr.ui', + 'gtkbuilder/dialog_unmet.ui', + 'gtkbuilder/dialog_update_failed.ui', + 'gtkbuilder/dialog_upgrade.ui', + 'gtkbuilder/dialog_welcome.ui', + 'gtkbuilder/window_changes.ui', + 'gtkbuilder/window_details.ui', + 'gtkbuilder/window_disc_name.ui', + 'gtkbuilder/window_fetch.ui', + 'gtkbuilder/window_filters.ui', + 'gtkbuilder/window_find.ui', + 'gtkbuilder/window_iconlegend.ui', + 'gtkbuilder/window_logview.ui', + 'gtkbuilder/window_main.ui', + 'gtkbuilder/window_preferences.ui', + 'gtkbuilder/window_repositories.ui', + 'gtkbuilder/window_rgdebinstall_progress.ui', + 'gtkbuilder/window_rginstall_progress_msgs.ui', + 'gtkbuilder/window_rginstall_progress.ui', + 'gtkbuilder/window_setopt.ui', + 'gtkbuilder/window_summary.ui', + 'gtkbuilder/window_tasks.ui', + 'gtkbuilder/window_zvtinstallprogress.ui', + ), + install_dir: join_paths(get_option('datadir'), 'synaptic', 'gtkbuilder'), +) diff --git a/help/C/Makefile.am b/help/C/Makefile.am deleted file mode 100644 index 81fd1c32a..000000000 --- a/help/C/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -figdir = figures -docname = synaptic -lang = C -entities = gpl.xml -include $(top_srcdir)/xmldocs.make -dist-hook: app-dist-hook - -# we build a html version of the english help as well -all: html diff --git a/help/Makefile.am b/help/Makefile.am deleted file mode 100644 index 8eb5b8d20..000000000 --- a/help/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## arch-tag: Automake rules for main help directory - -SUBDIRS = C es hr sv diff --git a/help/es/Makefile.am b/help/es/Makefile.am deleted file mode 100644 index 2702615d4..000000000 --- a/help/es/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -figdir = figures -docname = synaptic -lang = es -entities = gpl.xml -include $(top_srcdir)/xmldocs.make -dist-hook: app-dist-hook diff --git a/help/hr/Makefile.am b/help/hr/Makefile.am deleted file mode 100644 index 49ca79503..000000000 --- a/help/hr/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -figdir = figures -docname = synaptic -lang = hr -entities = gpl.xml -include $(top_srcdir)/xmldocs.make -dist-hook: app-dist-hook diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 000000000..4feac2213 --- /dev/null +++ b/help/meson.build @@ -0,0 +1,14 @@ +help_install_root = datadir / 'gnome' / 'help' / 'synaptic' +foreach lang : ['C', 'es', 'hr', 'sv'] + install_data( + [ + lang / 'synaptic.xml', + lang / 'gpl.xml', + ], + install_dir: help_install_root / lang, + ) + install_subdir( + lang / 'figures', + install_dir: help_install_root / lang, + ) +endforeach \ No newline at end of file diff --git a/help/sv/Makefile.am b/help/sv/Makefile.am deleted file mode 100644 index 0bcf47a1f..000000000 --- a/help/sv/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -figdir = figures -docname = synaptic -lang = sv -entities = gpl.xml -include $(top_srcdir)/xmldocs.make -dist-hook: app-dist-hook diff --git a/intl/Makefile.in b/intl/Makefile.in deleted file mode 100644 index de1066508..000000000 --- a/intl/Makefile.in +++ /dev/null @@ -1,221 +0,0 @@ -# Makefile for directory with message catalog handling in GNU NLS Utilities. -# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = .. -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -transform = @program_transform_name@ -libdir = $(exec_prefix)/lib -includedir = $(prefix)/include -datadir = $(prefix)/@DATADIRNAME@ -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = @datadir@/gettext/intl -aliaspath = $(localedir):. -subdir = intl - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ - -l = @l@ - -AR = ar -CC = @CC@ -LIBTOOL = @LIBTOOL@ -RANLIB = @RANLIB@ - -DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ --DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -HEADERS = $(COMHDRS) libgettext.h loadinfo.h -COMHDRS = gettext.h gettextP.h hash-string.h -SOURCES = $(COMSRCS) intl-compat.c cat-compat.c -COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ -finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ -explodename.c -OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ -finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ -explodename.$lo -CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo -GETTOBJS = intl-compat.$lo -DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ -xopen-msg.sed $(HEADERS) $(SOURCES) -DISTFILES.normal = -DISTFILES.gettext = libintl.glibc intlh.inst.in - -.SUFFIXES: -.SUFFIXES: .c .o .lo -.c.o: - $(COMPILE) $< -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) $< - -INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib - -all: all-@USE_INCLUDED_LIBINTL@ - -all-yes: libintl.$la intlh.inst -all-no: - -libintl.a: $(OBJECTS) - rm -f $@ - $(AR) cru $@ $(OBJECTS) - $(RANLIB) $@ - -libintl.la: $(OBJECTS) - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ - -version-info 1:0 -rpath $(libdir) - -../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot - cd ../po && $(MAKE) cat-id-tbl.$lo - -check: all - -# This installation goal is only used in GNU gettext. Packages which -# only use the library should use install instead. - -# We must not install the libintl.h/libintl.a files if we are on a -# system which has the gettext() function in its C library or in a -# separate library or use the catgets interface. A special case is -# where configure found a previously installed GNU gettext library. -# If you want to use the one which comes with this version of the -# package, you have to use `configure --with-included-gettext'. -install: install-exec install-data -install-exec: all - if test "$(PACKAGE)" = "gettext" \ - && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(libdir) $(includedir); \ - else \ - $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ - fi; \ - $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ - $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ - else \ - : ; \ - fi -install-data: all - if test "$(PACKAGE)" = "gettext"; then \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(gettextsrcdir); \ - else \ - $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ - fi; \ - $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - rm -f $(gettextsrcdir)/$$file; \ - done - -info dvi: - -$(OBJECTS): $(top_builddir)/config.h libgettext.h -bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h -dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h - -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) - -id: ID - -ID: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) - - -mostlyclean: - rm -f *.a *.o *.lo core core.* - -clean: mostlyclean - -distclean: clean - rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - - -# GNU gettext needs not contain the file `VERSION' but contains some -# other files which should not be distributed in other packages. -distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: Makefile $(DISTFILES) - if test "$(PACKAGE)" = gettext; then \ - additional="$(DISTFILES.gettext)"; \ - else \ - additional="$(DISTFILES.normal)"; \ - fi; \ - for file in $(DISTFILES.common) $$additional; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -distcopy: Makefile $(DISTFILES) - additional="$(DISTFILES.normal)"; - for file in $(DISTFILES.common) $$additional; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -dist-libc: - tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc - -Makefile: Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# The dependency for intlh.inst is different in gettext and all other -# packages. Because we cannot you GNU make features we have to solve -# the problem while rewriting Makefile.in. -@GT_YES@intlh.inst: intlh.inst.in $(top_builddir)/config.status -@GT_YES@ cd $(top_builddir) \ -@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ -@GT_YES@ $(SHELL) ./config.status -@GT_NO@.PHONY: intlh.inst -@GT_NO@intlh.inst: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/man/Makefile.am b/man/Makefile.am deleted file mode 100644 index 7500e7bd9..000000000 --- a/man/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -man_MANS = synaptic.8 - -EXTRA_DIST = synaptic.8 synaptic.es.8 synaptic.fr.8 synaptic.hr.8 synaptic.ja.8 synaptic.pt_BR.8 synaptic.ru.8 synaptic.tr.8 diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 000000000..048816817 --- /dev/null +++ b/man/meson.build @@ -0,0 +1 @@ +install_man('synaptic.8') diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..da55648e6 --- /dev/null +++ b/meson.build @@ -0,0 +1,213 @@ +project( + 'synaptic', + ['c', 'cpp'], + version: '0.90.1', + default_options: [ + 'warning_level=1', + 'cpp_std=gnu++17', + ], +) + +i18n = import('i18n') +fs = import('fs') + +prefix = get_option('prefix') +datadir = get_option('datadir') +localedir = get_option('localedir') +localstatedir = get_option('localstatedir') + +abs_datadir = datadir.startswith('/') ? datadir : join_paths(prefix, datadir) +abs_localedir = localedir.startswith('/') ? localedir : join_paths(prefix, localedir) +abs_localstatedir = localstatedir.startswith('/') ? localstatedir : join_paths(prefix, localstatedir) + +synaptic_gtkbuilderdir = join_paths(abs_datadir, 'synaptic', 'gtkbuilder') + '/' +synaptic_pixmapdir = join_paths(abs_datadir, 'synaptic', 'pixmaps') + '/' + +cc = meson.get_compiler('c') +cpp = meson.get_compiler('cpp') + +root_inc = include_directories('.') +common_inc = include_directories('common') +gtk_inc = include_directories('gtk') + +threads_dep = dependency('threads') +gtk_dep = dependency('gtk+-3.0', version: '>= 3.4.0') +pango_dep = dependency('pango', version: '>= 1.0.0') +glib_dep = dependency('glib-2.0') +apt_pkg_dep = dependency('apt-pkg', required: true) +x11_dep = cpp.find_library('X11', required: true) +util_dep = cpp.find_library('util', required: true) +apt_inst_dep = cpp.find_library('apt-inst', required: false) +dependency('polkit-gobject-1', required: true) + +if not cpp.has_header('apt-pkg/configuration.h', dependencies: apt_pkg_dep) + error('You need the apt-pkg headers installed to compile synaptic.') +endif + +rpm_deps = [] +rpm_compile_args = [] +have_rpm = false +if cpp.has_header('rpm/rpmlib.h', args: ['-I/usr/include/rpm']) + rpm_compile_args = ['-I/usr/include/rpm'] + rpm_dep_v4 = [ + cpp.find_library('rpm', required: false), + cpp.find_library('rpmio', required: false), + cpp.find_library('rpmdb', required: false), + cpp.find_library('popt', required: false), + ] + if rpm_dep_v4[0].found() and rpm_dep_v4[1].found() and rpm_dep_v4[2].found() and rpm_dep_v4[3].found() + rpm_deps = rpm_dep_v4 + have_rpm = true + else + rpm_dep_v3 = [ + cpp.find_library('rpm', required: false), + cpp.find_library('popt', required: false), + ] + if rpm_dep_v3[0].found() and rpm_dep_v3[1].found() + rpm_deps = rpm_dep_v3 + have_rpm = true + endif + endif +endif + +have_apt_auth = cpp.has_header('apt-pkg/metaindex.h', dependencies: apt_pkg_dep) +have_aptpkg_cdrom = cpp.has_header('apt-pkg/cdrom.h', dependencies: apt_pkg_dep) + +vte_dep = dependency('vte-2.91', version: '>= 0.5', required: false) +have_vte = vte_dep.found() + +if get_option('dpkg_progress').enabled() and not have_vte + error('dpkg-progress requires vte. Disable it with -Ddpkg_progress=disabled.') +endif + +launchpad_dep = dependency('launchpad-integration', required: get_option('launchpad_integration')) + +xapian_dep = dependency('', required: false) +have_xapian = false +xapian_config = find_program('xapian-config', required: false) +if xapian_config.found() + xapian_dep = declare_dependency( + compile_args: run_command(xapian_config, '--cxxflags', check: true).stdout().strip().split(), + link_args: run_command(xapian_config, '--libs', check: true).stdout().strip().split(), + ) + have_xapian = true +endif + +dpkg_vendor = find_program('dpkg-vendor', required: false) +vendor_derives_from_ubuntu = false +if dpkg_vendor.found() + vendor_derives_from_ubuntu = run_command( + dpkg_vendor, + '--derives-from', + 'ubuntu', + check: false, + ).returncode() == 0 +endif + +conf = configuration_data() +conf.set_quoted('GETTEXT_PACKAGE', 'synaptic') +conf.set_quoted('PACKAGE', meson.project_name()) +conf.set_quoted('PACKAGE_DATA_DIR', abs_datadir) +conf.set_quoted('PACKAGE_LOCALE_DIR', abs_localedir) +conf.set_quoted('SYNAPTIC_GTKBUILDERDIR', synaptic_gtkbuilderdir) +conf.set_quoted('SYNAPTIC_PIXMAPDIR', synaptic_pixmapdir) +conf.set_quoted('SYNAPTICLOCALEDIR', abs_localedir) +conf.set_quoted('SYNAPTICSTATEDIR', abs_localstatedir) +conf.set_quoted('VERSION', meson.project_version()) +conf.set('ENABLE_NLS', 1) + +if have_rpm + conf.set('HAVE_RPM', 1) +endif +if get_option('scripts') + conf.set('WITH_LUA', 1) +endif +if have_apt_auth + conf.set('WITH_APT_AUTH', 1) +endif +if have_aptpkg_cdrom + conf.set('HAVE_APTPKG_CDROM', 1) +endif +if have_xapian + conf.set('HAVE_XAPIAN', 1) +endif +if have_vte + conf.set('HAVE_VTE', 1) + conf.set('HAVE_TERMINAL', 1) +endif +if get_option('dpkg_progress').enabled() + conf.set('WITH_DPKG_STATUSFD', 1) +endif +if launchpad_dep.found() + conf.set('WITH_LAUNCHPAD_INTEGRATION', 1) +endif +if get_option('pkg_hold') + conf.set('SYNAPTIC_PKG_HOLD', 1) +endif +if get_option('apt_multiarch_support') + conf.set('WITH_APT_MULTIARCH_SUPPORT', 1) +endif +if vendor_derives_from_ubuntu + conf.set('VENDOR_DERIVES_FROM_UBUNTU', 1) +endif + +configure_file(output: 'config.h', configuration: conf) + +base_cpp_args = [ + '-DHAVE_CONFIG_H', + '-DGETTEXT_PACKAGE="synaptic"', + '-DPACKAGE_DATA_DIR="@0@"'.format(abs_datadir), + '-DPACKAGE_LOCALE_DIR="@0@"'.format(abs_localedir), + '-DSYNAPTIC_GTKBUILDERDIR="@0@"'.format(synaptic_gtkbuilderdir), + '-DSYNAPTIC_PIXMAPDIR="@0@"'.format(synaptic_pixmapdir), + '-DSYNAPTICLOCALEDIR="@0@"'.format(abs_localedir), + '-DSYNAPTICSTATEDIR="@0@"'.format(abs_localstatedir), + '-DVERSION="@0@"'.format(meson.project_version()), +] +gtk_cpp_args = [ + '-DG_DISABLE_DEPRECATED', + '-DGDK_DISABLE_DEPRECATED', + '-DGTK_DISABLE_DEPRECATED', + '-DGDK_PIXBUF_DISABLE_DEPRECATED', +] + +common_deps = [apt_pkg_dep] +common_deps += rpm_deps +if apt_inst_dep.found() + common_deps += [apt_inst_dep] +endif +if have_xapian + common_deps += [xapian_dep] +endif + +gui_deps = [ + gtk_dep, + pango_dep, + glib_dep, + apt_pkg_dep, + x11_dep, + util_dep, + threads_dep, +] +gui_deps += rpm_deps +if apt_inst_dep.found() + gui_deps += [apt_inst_dep] +endif +if have_vte + gui_deps += [vte_dep] +endif +if have_xapian + gui_deps += [xapian_dep] +endif +if launchpad_dep.found() + gui_deps += [launchpad_dep] +endif + +subdir('po') +subdir('common') +subdir('gtk') +subdir('data') +subdir('pixmaps') +subdir('man') +subdir('help') +subdir('tests') \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000..05ced0ba9 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,34 @@ +option( + 'scripts', + type: 'boolean', + value: false, + description: 'Enable the extension system', +) + +option( + 'dpkg_progress', + type: 'feature', + value: 'enabled', + description: 'Build with support for the dpkg progress bar', +) + +option( + 'launchpad_integration', + type: 'boolean', + value: false, + description: 'Build with launchpad-integration support', +) + +option( + 'pkg_hold', + type: 'boolean', + value: false, + description: 'Build with the experimental package hold feature', +) + +option( + 'apt_multiarch_support', + type: 'boolean', + value: true, + description: 'Build with apt multiarch support', +) diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am deleted file mode 100644 index 1ad5cbd2f..000000000 --- a/pixmaps/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -# Makefile.am for the pixmaps - -SUBDIRS = hicolor - -buttondir = $(datadir)/synaptic/gtkbuilder -button_DATA = update_small.png \ - upgrade_small.png \ - distupgrade_small.png\ - proceed_small.png \ - pref_vpaned.xpm \ - pref_hpaned.xpm \ - stock_filter-data-by-criteria.png\ - stock_filter-navigator.png \ - stock_menu_about.png \ - stock_help-book.png - -fetchstatusdir = $(datadir)/synaptic/pixmaps -fetchstatus_DATA = green.png \ - yellow.png \ - red.png - -abouticondir = $(datadir)/synaptic/gtkbuilder -abouticon_DATA = deb.png \ - cnc.png \ - logo.png - -EXTRA_DIST=\ - alert.xpm\ - alertM.xpm\ - brokenM.xpm\ - cdrom.xpm\ - cnc.xpm\ - cnc2.xpm\ - deb.xpm\ - distupgrade.xpm\ - downgradeM.xpm\ - filter.xpm\ - find.xpm\ - fixbroken.xpm\ - heldM.xpm\ - holdM.xpm \ - installM.xpm\ - keepM.xpm \ - logo.xpm\ - newM.xpm \ - options.xpm\ - proceed.xpm\ - removeM.xpm\ - sources.xpm\ - stop.xpm\ - update.xpm\ - upgrade.xpm\ - upgradeM.xpm\ - up.xpm\ - down.xpm\ - stock_filter-data-by-criteria.png\ - stock_filter-navigator.png\ - $(button_DATA) \ - $(abouticon_DATA) \ - $(fetchstatus_DATA) - diff --git a/pixmaps/hicolor/16x16/actions/Makefile.am b/pixmaps/hicolor/16x16/actions/Makefile.am deleted file mode 100644 index 6a3cd7e9e..000000000 --- a/pixmaps/hicolor/16x16/actions/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -status_icondir = $(datadir)/icons/hicolor/16x16/actions -status_icon_DATA = $(srcdir)/*.png -EXTRA_DIST=$(status_icon_DATA) diff --git a/pixmaps/hicolor/24x24/actions/Makefile.am b/pixmaps/hicolor/24x24/actions/Makefile.am deleted file mode 100644 index a66edb219..000000000 --- a/pixmaps/hicolor/24x24/actions/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -icondir = $(datadir)/icons/hicolor/24x24/actions -icon_DATA = $(srcdir)/*.png -EXTRA_DIST=$(icon_DATA) diff --git a/pixmaps/hicolor/256x256/apps/Makefile.am b/pixmaps/hicolor/256x256/apps/Makefile.am deleted file mode 100644 index 230a5fa60..000000000 --- a/pixmaps/hicolor/256x256/apps/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -icondir = $(datadir)/icons/hicolor/256x256/apps -icon_DATA = $(srcdir)/*.png -EXTRA_DIST=$(icon_DATA) diff --git a/pixmaps/hicolor/Makefile.am b/pixmaps/hicolor/Makefile.am deleted file mode 100644 index cd8289881..000000000 --- a/pixmaps/hicolor/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS=16x16/actions 24x24/actions 256x256/apps scalable/apps diff --git a/pixmaps/hicolor/scalable/apps/Makefile.am b/pixmaps/hicolor/scalable/apps/Makefile.am deleted file mode 100644 index 656f24f4d..000000000 --- a/pixmaps/hicolor/scalable/apps/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -icondir = $(datadir)/icons/hicolor/scalable/apps -icon_DATA = $(srcdir)/*.svg -EXTRA_DIST=$(icon_DATA) diff --git a/pixmaps/meson.build b/pixmaps/meson.build new file mode 100644 index 000000000..d6cb0f245 --- /dev/null +++ b/pixmaps/meson.build @@ -0,0 +1,63 @@ +install_data( + files( + 'update_small.png', + 'upgrade_small.png', + 'distupgrade_small.png', + 'proceed_small.png', + 'pref_vpaned.xpm', + 'pref_hpaned.xpm', + 'stock_filter-data-by-criteria.png', + 'stock_filter-navigator.png', + 'stock_menu_about.png', + 'stock_help-book.png', + 'deb.png', + 'cnc.png', + 'logo.png', + ), + install_dir: join_paths(get_option('datadir'), 'synaptic', 'gtkbuilder'), +) + +install_data( + files( + 'green.png', + 'yellow.png', + 'red.png', + ), + install_dir: join_paths(get_option('datadir'), 'synaptic', 'pixmaps'), +) + +install_data( + files( + 'hicolor/16x16/actions/package-available-locked.png', + 'hicolor/16x16/actions/package-available.png', + 'hicolor/16x16/actions/package-broken.png', + 'hicolor/16x16/actions/package-downgrade.png', + 'hicolor/16x16/actions/package-install.png', + 'hicolor/16x16/actions/package-installed-locked.png', + 'hicolor/16x16/actions/package-installed-outdated.png', + 'hicolor/16x16/actions/package-installed-updated.png', + 'hicolor/16x16/actions/package-new.png', + 'hicolor/16x16/actions/package-purge.png', + 'hicolor/16x16/actions/package-reinstall.png', + 'hicolor/16x16/actions/package-remove.png', + 'hicolor/16x16/actions/package-supported.png', + 'hicolor/16x16/actions/package-upgrade.png', + 'hicolor/16x16/actions/system-upgrade.png', + ), + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', '16x16', 'actions'), +) + +install_data( + files('hicolor/24x24/actions/system-upgrade.png'), + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', '24x24', 'actions'), +) + +install_data( + files('hicolor/256x256/apps/synaptic.png'), + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', '256x256', 'apps'), +) + +install_data( + files('hicolor/scalable/apps/synaptic.svg'), + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'), +) diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 000000000..0f1f38b03 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,110 @@ +af +am +ar +ast +az +be +be@latin +bg +bn +bo +br +bs +ca +ca@valencia +ckb +crh +cs +csb +cy +da +de +de_DE +dv +el +en_AU +en_CA +en_GB +eo +es +et +eu +fa +fi +fil +fo +fr +fur +fy +ga +gl +gu +gv +he +hi +hr +ht +hu +hy +ia +id +is +it +ja +ka +km +kn +ko +ku +ky +la +lo +lt +lv +mk +ml +mr +ms +my +nb +nds +ne +nl +nl_NL +nn +no +oc +pa +pl +ps +pt +pt_BR +pt_PT +qu +ro +ru +sc +si +sk +sl +sq +sr +sr@Latn +sv +ta +ta_LK +te +tet +th +tl +tr +tt +ug +uk +ur +uz +vi +xh +zh_CN +zh_HK +zh_TW diff --git a/po/Makefile.in.in b/po/Makefile.in.in deleted file mode 100644 index fcd2c3b70..000000000 --- a/po/Makefile.in.in +++ /dev/null @@ -1,221 +0,0 @@ -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper -# Copyright (C) 2004-2008 Rodney Dawes -# -# This file may be copied and used freely without restrictions. It may -# be used in projects which are not available under a GNU Public License, -# but which still want to provide support for the GNU gettext functionality. -# -# - Modified by Owen Taylor to use GETTEXT_PACKAGE -# instead of PACKAGE and to look for po2tbl in ./ not in intl/ -# -# - Modified by jacob berkman to install -# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize -# -# - Modified by Rodney Dawes for use with intltool -# -# We have the following line for use by intltoolize: -# INTLTOOL_MAKEFILE - -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datadir = @datadir@ -datarootdir = @datarootdir@ -libdir = @libdir@ -localedir = @localedir@ -subdir = po -install_sh = @install_sh@ -# Automake >= 1.8 provides @mkdir_p@. -# Until it can be supposed, use the safe fallback: -mkdir_p = $(install_sh) -d - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot - -ALL_LINGUAS = @ALL_LINGUAS@ - -PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) - -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) - -USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) - -POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) - -DISTFILES = Makefile.in.in POTFILES.in $(POFILES) -EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS - -POTFILES = \ -# This comment gets stripped out - -CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) - -.SUFFIXES: -.SUFFIXES: .po .pox .gmo .mo .msg .cat - -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V)) -INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) -INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@; - -.po.pox: - $(MAKE) $(GETTEXT_PACKAGE).pot - $(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox - -.po.mo: - $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $< - -.po.gmo: - $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -o $$file $< - -.po.cat: - sed -f ../intl/po2msg.sed < $< > $*.msg \ - && rm -f $@ && gencat $@ $*.msg - - -all: all-@USE_NLS@ - -all-yes: $(CATALOGS) -all-no: - -$(GETTEXT_PACKAGE).pot: $(POTFILES) - $(GENPOT) - -install: install-data -install-data: install-data-@USE_NLS@ -install-data-no: all -install-data-yes: all - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $$dir; \ - if test -r $$lang.gmo; then \ - $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ - echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ - echo "installing $(srcdir)/$$lang.gmo as" \ - "$$dir/$(GETTEXT_PACKAGE).mo"; \ - fi; \ - if test -r $$lang.gmo.m; then \ - $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ - echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ - else \ - if test -r $(srcdir)/$$lang.gmo.m ; then \ - $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ - $$dir/$(GETTEXT_PACKAGE).mo.m; \ - echo "installing $(srcdir)/$$lang.gmo.m as" \ - "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ - else \ - true; \ - fi; \ - fi; \ - done - -# Empty stubs to satisfy archaic automake needs -dvi info ctags tags CTAGS TAGS ID: - -# Define this as empty until I found a useful application. -install-exec installcheck: - -uninstall: - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ - done - -check: all $(GETTEXT_PACKAGE).pot - rm -f missing notexist - srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m - if [ -r missing -o -r notexist ]; then \ - exit 1; \ - fi - -mostlyclean: - rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp - rm -f .intltool-merge-cache - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES stamp-it - rm -f *.mo *.msg *.cat *.cat.m *.gmo - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f Makefile.in.in - -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: $(DISTFILES) - dists="$(DISTFILES)"; \ - extra_dists="$(EXTRA_DISTFILES)"; \ - for file in $$extra_dists; do \ - test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ - done; \ - for file in $$dists; do \ - test -f $$file || file="$(srcdir)/$$file"; \ - ln $$file $(distdir) 2> /dev/null \ - || cp -p $$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(GETTEXT_PACKAGE).pot - tmpdir=`pwd`; \ - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - echo "$$lang:"; \ - result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ - if $$result; then \ - if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.gmo failed!"; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi; \ - done - -Makefile POTFILES: stamp-it - @if test ! -f $@; then \ - rm -f stamp-it; \ - $(MAKE) stamp-it; \ - fi - -stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ - $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 000000000..97da80941 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,4 @@ +i18n.gettext( + 'synaptic', + preset: 'glib', +) diff --git a/pre-build.sh b/pre-build.sh index 23cb9dfb8..965649693 100755 --- a/pre-build.sh +++ b/pre-build.sh @@ -1,10 +1,10 @@ #!/bin/sh DEBVER=$(dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p') -CONFVER=$(sed -n -e 's/AC_INIT(synaptic, \(.*\))/\1/p' configure.ac) +CONFVER=$(grep -oP "version:\s*'\K[^']+" meson.build | head -1) if [ "$DEBVER" != "$CONFVER" ]; then - sed -i -e "s/$CONFVER/$DEBVER/" configure.ac - echo "Changed version in configure.ac, please commit." + sed -i -e "s/$CONFVER/$DEBVER/" meson.build + echo "Changed version in meson.build, please commit." exit 1 fi diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index ef970baec..000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ - -AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \ - @SYNAPTIC_APP_PATHS@ \ - @GTK_DISABLE_DEPRECATED@ \ - @GTK_CFLAGS@ \ - @VTE_CFLAGS@ \ - @LP_CFLAGS@ \ - @APT_PKG_CFLAGS@ \ - $(LIBTAGCOLL_CFLAGS) \ - -O0 -g3 - -noinst_PROGRAMS = test_rpackage test_rpackageview test_gtkpkglist test_rpackagefilter - -LDADD = \ - ${top_builddir}/common/libsynaptic.a \ - @RPM_LIBS@ \ - @DEB_LIBS@ \ - @GTK_LIBS@ \ - @VTE_LIBS@ \ - @LP_LIBS@ \ - @APT_PKG_LIBS@ \ - @XAPIAN_LIBS@ \ - -lpthread \ - -lutil \ - -lX11 - -test_rpackage_SOURCES= test_rpackage.cc - -test_rpackagefilter_SOURCES= test_rpackagefilter.cc - -test_rpackageview_SOURCES= test_rpackageview.cc - -test_gtkpkglist_SOURCES= test_gtkpkglist.cc \ - ${top_srcdir}/gtk/rgpackagestatus.cc\ - ${top_srcdir}/gtk/rgutils.cc\ - ${top_srcdir}/gtk/rgpkgtreeview.cc\ - ${top_srcdir}/gtk/gtkpkglist.cc - -CLEANFILES= $(wildcard *_wrap.*) $(wildcard *~) diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 000000000..e5c63364b --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,50 @@ +test_env = environment() +test_env.set('LC_ALL', 'C') + +test_common_deps = gui_deps + +test_rpackage = executable( + 'test_rpackage', + 'test_rpackage.cc', + cpp_args: base_cpp_args + gtk_cpp_args + rpm_compile_args + ['-O0', '-g3'], + dependencies: test_common_deps, + include_directories: [root_inc, common_inc, gtk_inc], + link_with: libsynaptic, +) + +test_rpackagefilter = executable( + 'test_rpackagefilter', + 'test_rpackagefilter.cc', + cpp_args: base_cpp_args + gtk_cpp_args + rpm_compile_args + ['-O0', '-g3'], + dependencies: test_common_deps, + include_directories: [root_inc, common_inc, gtk_inc], + link_with: libsynaptic, +) + +test_rpackageview = executable( + 'test_rpackageview', + 'test_rpackageview.cc', + cpp_args: base_cpp_args + gtk_cpp_args + rpm_compile_args + ['-O0', '-g3'], + dependencies: test_common_deps, + include_directories: [root_inc, common_inc, gtk_inc], + link_with: libsynaptic, +) + +test_gtkpkglist = executable( + 'test_gtkpkglist', + [ + 'test_gtkpkglist.cc', + '../gtk/rgpackagestatus.cc', + '../gtk/rgutils.cc', + '../gtk/rgpkgtreeview.cc', + '../gtk/gtkpkglist.cc', + ], + cpp_args: base_cpp_args + gtk_cpp_args + rpm_compile_args + ['-O0', '-g3'], + dependencies: test_common_deps, + include_directories: [root_inc, common_inc, gtk_inc], + link_with: libsynaptic, +) + +test('test_rpackage', test_rpackage, env: test_env) +test('test_rpackagefilter', test_rpackagefilter, env: test_env) +test('test_rpackageview', test_rpackageview, env: test_env) diff --git a/tests/test_rpackage.cc b/tests/test_rpackage.cc index ab51aa63c..946b38662 100644 --- a/tests/test_rpackage.cc +++ b/tests/test_rpackage.cc @@ -15,18 +15,24 @@ int main(int argc, char **argv) RPackageLister *lister = new RPackageLister(); lister->openCache(); - RPackage *pkg = lister->getPackage("eog"); - cerr << "pkg: " << pkg->name() << endl; - cerr << "Bugs: " << pkg->findTagFromPkgRecord("Bugs") << endl; - vector deps = pkg->enumDeps(); - for(unsigned int i=0;igetPackage("build-essential"); + if (pkg) { + cerr << "pkg: " << pkg->name() << endl; + cerr << "Bugs: " << pkg->findTagFromPkgRecord("Bugs") << endl; + + vector deps = pkg->enumDeps(); + for(unsigned int i=0;i all = lister->getPackages(); + cerr << "All: " << all.size() << endl; for(int i=0;ifindTagFromPkgRecord("Bugs"); } diff --git a/xmldocs.make b/xmldocs.make deleted file mode 100644 index 0d3b770dd..000000000 --- a/xmldocs.make +++ /dev/null @@ -1,100 +0,0 @@ -# -# No modifications of this Makefile should be necessary. -# -# To use this template: -# 1) Define: figdir, docname, lang, omffile, and entities in -# your Makefile.am file for each document directory, -# although figdir, omffile, and entities may be empty -# 2) Make sure the Makefile in (1) also includes -# "include $(top_srcdir)/xmldocs.make" and -# "dist-hook: app-dist-hook". -# 3) Optionally define 'entities' to hold xml entities which -# you would also like installed -# 4) Figures must go under $(figdir)/ and be in PNG format -# 5) You should only have one document per directory -# 6) Note that the figure directory, $(figdir)/, should not have its -# own Makefile since this Makefile installs those figures. -# -# example Makefile.am: -# figdir = figures -# docname = scrollkeeper-manual -# lang = C -# omffile=scrollkeeper-manual-C.omf -# entities = fdl.xml -# include $(top_srcdir)/xmldocs.make -# dist-hook: app-dist-hook -# -# About this file: -# This file was taken from scrollkeeper_example2, a package illustrating -# how to install documentation and OMF files for use with ScrollKeeper -# 0.3.x and 0.4.x. For more information, see: -# http://scrollkeeper.sourceforge.net/ -# Version: 0.1.2 (last updated: March 20, 2002) -# - - -# ************* Begin of section some packagers may need to modify ************** -# This variable (docdir) specifies where the documents should be installed. -# This default value should work for most packages. -# docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang) -docdir = $(datadir)/gnome/help/$(docname)/$(lang) - -# ************** You should not have to edit below this line ******************* -xml_files = $(entities) $(docname).xml - -EXTRA_DIST = $(xml_files) -CLEANFILES = html_timestamp - -all: html - -html: html_timestamp - -html_timestamp: $(docname).xml - rm -f $(top_builddir)/doc/html/$(lang)/*html - xmlto html -o $(top_builddir)/doc/html/$(lang) --skip-validation $(srcdir)/$(docname).xml - mkdir -p $(top_builddir)/doc/html/$(lang)/figures - cp $(top_srcdir)/help/$(lang)/figures/* $(top_builddir)/doc/html/$(lang)/figures - touch html_timestamp - -$(docname).xml: $(entities) - -ourdir=`pwd`; \ - cd $(srcdir); \ - cp $(entities) $$ourdir - -app-dist-hook: html - if test "$(figdir)"; then \ - $(mkinstalldirs) $(distdir)/$(figdir); \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ - done \ - fi - -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(docdir) - for file in $(xml_files); do \ - cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ - done - if test "$(figdir)"; then \ - $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ - done \ - fi - -uninstall-local: uninstall-local-doc - -uninstall-local-doc: - -if test "$(figdir)"; then \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - rm -f $(docdir)/$(figdir)/$$basefile; \ - done; \ - rmdir $(DESTDIR)$(docdir)/$(figdir); \ - fi - -for file in $(xml_files); do \ - rm -f $(DESTDIR)$(docdir)/$$file; \ - done - -rmdir $(DESTDIR)$(docdir) -