grim/glibre

11fe2758493f
Parents e13296b9e125
Children 61dc7351c2a1
Replace cmake with meson, move to gtk3, update docs
  • +0 -113
    CMakeLists.txt
  • +6 -32
    INSTALL
  • +1 -1
    README
  • +15 -0
    meson.build
  • --- a/CMakeLists.txt Tue Aug 06 21:40:27 2019 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,113 +0,0 @@
    -cmake_minimum_required(VERSION 2.8)
    -
    -###############################################################################
    -# Project Info
    -###############################################################################
    -project(glibre C)
    -
    -set(GLIBRE_MAJOR_VERSION "0")
    -set(GLIBRE_MINOR_VERSION "0")
    -set(GLIBRE_MICRO_VERSION "3")
    -set(GLIBRE_EXTRA_VERSION "dev")
    -
    -###############################################################################
    -# Dependencies
    -###############################################################################
    -include(FindPkgConfig)
    -
    -pkg_check_modules(GLIB REQUIRED glib-2.0>=2.24.0)
    -pkg_check_modules(GTK2 REQUIRED gtk+-3.0>=3.0.0)
    -
    -###############################################################################
    -# Build Info
    -###############################################################################
    -configure_file(glibre.desktop.in glibre.desktop @ONLY)
    -
    -add_definitions(
    - -DVERSION="${GLIBRE_MAJOR_VERSION}.${GLIBRE_MINOR_VERSION}.${GLIBRE_MICRO_VERSION}${GLIBRE_EXTRA_VERSION}"
    - -g -g3
    -)
    -
    -include_directories(
    - ${GLIB_INCLUDE_DIRS}
    - ${GTK2_INCLUDE_DIRS}
    -)
    -
    -link_directories(
    - ${GLIB_LIBRARY_DIRS}
    - ${GTK2_LIBRARY_DIRS}
    -)
    -
    -add_executable(glibre
    - glibre.c
    -)
    -
    -target_link_libraries(glibre
    - ${GTK2_LIBRARIES}
    -)
    -
    -###############################################################################
    -# install stuff
    -###############################################################################
    -
    -# main application
    -install(
    - TARGETS glibre
    - RUNTIME DESTINATION bin
    -)
    -
    -# desktop file
    -install(
    - FILES glibre.desktop
    - DESTINATION share/applications
    -)
    -
    -# documentation
    -install(
    - FILES ChangeLog INSTALL README
    - DESTINATION share/doc/glibre
    -)
    -
    -###############################################################################
    -# packaging stuff
    -###############################################################################
    -
    -set(CPACK_GENERATOR "STGZ")
    -set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
    -
    -set(CPACK_PACKAGE_NAME "glibre")
    -set(CPACK_PACKAGE_VENDOR "Gary Kramlich <grim@reaperworld.com>")
    -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The glib regex tester")
    -set(CPACK_PACKAGE_DESCRIPTION "GlibRe is a GTK+ application used to test regular expressions using the regular expression library in Glib.")
    -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
    -
    -set(CPACK_PACKAGE_VERSION_MAJOR ${GLIBRE_MAJOR_VERSION})
    -set(CPACK_PACKAGE_VERSION_MINOR ${GLIBRE_MINOR_VERSION})
    -set(CPACK_PACKAGE_VERSION_PATCH ${GLIBRE_MICRO_VERSION}${GLIBRE_EXTRA_VERSION})
    -set(CPACK_PACKAGE_VERSION ${GLIBRE_MAJOR_VERSION}.${GLIBRE_MINOR_VERSION}.${GLIBRE_MICRO_VERSION}${GLIBRE_EXTRA_VERSION})
    -
    -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
    -set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
    -
    -set(CPACK_SOURCE_IGNORE_FILES
    - ".swp$;CPack;CMakeFiles;CMakeCache.txt$;Makefile;cmake_install.cmake"
    - "glibre.desktop$;glibre$;.hg;install_manifest.txt"
    - "${CPACK_SOURCE_PACKAGE_FILE_NAME};${CPACK_PACKAGE_FILE_NAME}"
    -)
    -
    -
    -set(CPACK_PACKAGE_EXECUTABLES "glibre" "GlibRe")
    -
    -# debian stuff
    -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Gary Kramlich <grim@reaperworld.com>")
    -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libglib2.0-0 (>=2.24.0), libgtk3.0-0 (>=3.0.0), libgdl-3-1 (>=3.0.0)")
    -set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
    -
    -# rpm stuff
    -set(CPACK_RPM_PACKAGE_RELEASE "1")
    -set(CPACK_RPM_PACKAGE_LICENSE "gplv3")
    -set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
    -set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
    -
    -include(CPack)
    -
    --- a/INSTALL Tue Aug 06 21:40:27 2019 -0500
    +++ b/INSTALL Tue Aug 06 21:50:54 2019 -0500
    @@ -3,42 +3,16 @@
    glibre depends on:
    glib-2.0 >= 2.24.0
    gtk+-3.0 >= 3.0.0
    - gdl-3.0 >= 3.0.0
    All of these packages and there development headers need to be installed
    prior to building glibre.
    Building
    ========
    -glibre uses CMake (http://www.cmake.org) as it's build system. As such
    -compiling is a little bit different than your typical ./configure, make,
    -sudo make install. But not by much. To compile glibre you need run the
    -following commands:
    -
    - mkdir build
    - cd build
    - cmake ..
    - make
    - sudo make install
    -
    -As a special note, if you're using homebrew on MAC OSX, you should not run
    -"sudo make install"! Instead run "make install" otherwise you're going to
    -break your homebrew setup. :)
    +glibre uses meson as it's build system. As such compiling is a little bit
    +different than your typical ./configure, make, sudo make install. But not by
    +much. To compile glibre you need run the following commands:
    -If you would like to create a packages, you can run following commands to make
    -source packages:
    -
    - make package_source
    -
    -To make binary packages, you can run:
    -
    - make package
    -
    -Right now this only creates a self-extracting tarball, but you can create a
    -debian package by running:
    -
    - cpack -G DEB CPackConfig.cmake
    -
    -This step will eventually be moved away when we're able to determine exactly
    -what packages we can build on the current platform.
    -
    + meson build
    + cd build
    + ninja install
    --- a/README Tue Aug 06 21:40:27 2019 -0500
    +++ b/README Tue Aug 06 21:50:54 2019 -0500
    @@ -9,6 +9,6 @@
    The basic functionality is all there today, but I'm always looking for new ways
    to improve it. If you have an idea, feel free to add it to our issue tracker
    -at https://www.guifications.org/projects/glibre. Or if you're capable and
    +at https://bitbucket.org/rw_grim/glibre/issues/. Or if you're capable and
    willing feel free to send in some patches.
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/meson.build Tue Aug 06 21:50:54 2019 -0500
    @@ -0,0 +1,15 @@
    +project('glibre', 'c', version : '0.0.3-dev')
    +
    +GLIB = dependency('glib-2.0', version : '>=2.40.0')
    +GTK3 = dependency('gtk+-3.0', version : '>=3.18.0')
    +
    +add_project_arguments(
    + '-DVERSION="@0@"'.format(meson.project_version()),
    + language : 'c',
    +)
    +
    +glibre = executable('glibre',
    + 'glibre.c',
    + dependencies: [GLIB, GTK3],
    + install: true,
    +)