Skip to content

Commit

Permalink
Merge v1.6.0 updates into libmypaint-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
jplloyd committed Apr 29, 2020
2 parents e5264c3 + 108516e commit 2f3fb7b
Show file tree
Hide file tree
Showing 169 changed files with 85,226 additions and 8,846 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ autom4te.cache/
.libs/
*.lo

libmypaint.la
gegl/libmypaint-gegl.la
libmypaint-*.la
gegl/libmypaint-gegl-*.la

po/*.gmo
po/Makefile*
Expand Down
38 changes: 22 additions & 16 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INTROSPECTION_SCANNER_ARGS = \
--warn-all \
--pkg="glib-2.0" \
--namespace="MyPaint" \
--nsversion="$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION)" \
--nsversion="$(LIBMYPAINT_API_PLATFORM_VERSION)" \
--identifier-prefix="MyPaint" \
--symbol-prefix="mypaint_" \
--add-include-path="$(srcdir)" \
Expand All @@ -31,18 +31,21 @@ MyPaint_introspectable_headers = \
mypaint-rectangle.h \
mypaint-surface.h \
mypaint-tiled-surface.h \
fastapprox/fastpow.h \
fastapprox/sse.h \
fastapprox/fastexp.h \
fastapprox/cast.h \
fastapprox/fastlog.h \
$(libmypaint_glib)

if HAVE_INTROSPECTION

introspection_sources = \
$(MyPaint_introspectable_headers) \
brushmodes.c \
libmypaint.c \
mypaint-brush-settings.c \
mypaint-rectangle.c \
operationqueue.c \
utils.c \
fifo.c \
mypaint-mapping.c \
mypaint.c \
Expand All @@ -54,12 +57,13 @@ introspection_sources = \
mypaint-tiled-surface.c \
tilemap.c

MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@[email protected]: libmypaint.la Makefile
MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0
MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint.la
MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@[email protected]
# CAUTION: some of these need to use the underscored API version string.
MyPaint-@[email protected]: libmypaint.la Makefile
MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_INCLUDES = GObject-2.0 GLib-2.0
MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_LIBS = libmypaint.la
MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += MyPaint-@[email protected]

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
Expand All @@ -77,9 +81,9 @@ pkgconfigdir = $(libdir)/pkgconfig

pkgconfig_DATA = libmypaint.pc

## libmypaint ##
## libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@ ##

AM_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS)
AM_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(OPENMP_CFLAGS)

LIBS = $(JSON_LIBS) $(GLIB_LIBS) @LIBS@

Expand All @@ -90,12 +94,15 @@ libmypaint_la_LDFLAGS = \
-version-info @LIBMYPAINT_ABI_VERSION_INFO@ \
-no-undefined


libmypaint_publicdir = $(includedir)/libmypaint

nobase_libmypaint_public_HEADERS = \
mypaint-config.h \
mypaint-glib-compat.h \
mypaint-mapping.h \
mypaint-matrix.h \
mypaint-symmetry.h \
$(MyPaint_introspectable_headers)

LIBMYPAINT_SOURCES = \
Expand All @@ -109,17 +116,18 @@ LIBMYPAINT_SOURCES = \
mypaint-brush.c \
mypaint-brush-settings.c \
mypaint-fixed-tiled-surface.c \
mypaint-matrix.c \
mypaint-symmetry.c \
mypaint-rectangle.c \
mypaint-surface.c \
mypaint-tiled-surface.c \
operationqueue.c \
rng-double.c \
tilemap.c \
utils.c
tilemap.c

libmypaint_la_SOURCES = $(libmypaint_public_HEADERS) $(LIBMYPAINT_SOURCES)

DISTCLEANFILES = MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir.files
DISTCLEANFILES = MyPaint-@LIBMYPAINT_API_PLATFORM_VERSION@.gir.files

EXTRA_DIST = \
brushsettings.json \
Expand All @@ -133,12 +141,10 @@ EXTRA_DIST = \
fifo.h \
generate.py \
helpers.h \
libmypaint.c \
operationqueue.h \
rng-double.h \
tiled-surface-private.h \
tilemap.h \
utils.h \
glib/mypaint-brush.c

if HAVE_I18N
Expand Down
43 changes: 34 additions & 9 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# libmypaint - MyPaint brush engine library

[![Translation Status](https://hosted.weblate.org/widgets/mypaint/libmypaint/svg-badge.svg)](https://hosted.weblate.org/engage/mypaint/?utm_source=widget)
[![Translation status](https://hosted.weblate.org/widgets/mypaint/-/libmypaint/svg-badge.svg)](https://hosted.weblate.org/engage/mypaint/?utm_source=widget)
[![Travis Build Status](https://travis-ci.org/mypaint/libmypaint.svg?branch=master)](https://travis-ci.org/mypaint/libmypaint)
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/mypaint/libmypaint?branch=master&svg=true)](https://ci.appveyor.com/project/jonnor/libmypaint)

Expand Down Expand Up @@ -35,25 +35,39 @@ to get started with a standard configuration:

When building from git:

$ sudo apt install -y python2.7 autotools-dev intltool gettext libtool
$ sudo apt install -y python autotools-dev intltool gettext libtool

You might also try using your package manager:

$ sudo apt build-dep mypaint # will get additional deps for MyPaint (GUI)
$ sudo apt build-dep libmypaint # may not exist; included in mypaint

### Install dependencies (Red Hat and derivatives)

The following works on a minimal CentOS 7 installation:

# yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel
$ sudo yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel

When building from git, you'll want to add:

# yum install -y git python autoconf intltool gettext libtool
$ sudo yum install -y git python autoconf intltool gettext libtool

You might also try your package manager:

$ sudo yum builddep libmypaint

## Build and install

MyPaint and libmypaint benefit dramatically from autovectorization and other compiler optimizations.
You may want to set your CFLAGS before compiling (for gcc):

$ export CFLAGS='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'

The traditional setup works just fine.

$ ./autogen.sh # Only needed when building from git.
$ ./configure
$ make install
$ sudo make install
$ sudo ldconfig

### Maintainer mode
Expand Down Expand Up @@ -96,7 +110,7 @@ This runs all the unit tests.

### Install

$ make install
$ sudo make install

Uninstall libmypaint with `make uninstall`.

Expand All @@ -109,11 +123,22 @@ Make sure that pkg-config can see libmypaint before trying to build with it.
If it's not found, you'll need to add the relevant pkgconfig directory to
the `pkg-config` search path. For example, on CentOS, with a default install:

$ echo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >>/etc/environment
$ sudo sh -c "echo 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' >>/etc/environment"

Make sure ldconfig can see libmypaint as well

$ sudo ldconfig -p |grep -i libmypaint

If it's not found, you'll need to add the relevant lib directory to
the LD_LIBRARY_PATH:

For Arch and derivatives you may have to enable /usr/local for libraries:
$ export LD_LIBRARY_PATH=/usr/local/lib
$ sudo sh -c "echo 'LD_LIBRARY_PATH=/usr/local/lib' >>/etc/environment

$ echo '/usr/local/lib' > /etc/ld.so.conf.d/usrlocal.conf
Alternatively, you may want to enable /usr/local for libraries. Arch and Redhat derivatives:

$ sudo sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/usrlocal.conf"
$ sudo ldconfig

## Contributing

Expand Down
43 changes: 43 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# API and ABI versioning policy

libMyPaint cannot afford to be sloppy about its version numbers because
other projects depend on it.

API versions on `master` increment ahead of the upcoming release
as and when features and changes are added. ABI versions are always
updated immediately before each release, and _only_ then.

1. The `master` branch contains the _future release_'s API version
number. This version number is updated as and when new features and
API changes are committed to the master branch. Do this by updating
[configure.ac][]'s `libmypaint_api_*` macros as part of your commit.
The reference point for these updates is the current stable release's
version number.

* Rules for the API version number: libmypaint uses
[Semantic Versioning][].

* Note that the major and minor components of the API version number
form part of the _soname_ for binary library files used at runtime,
but they're not part of the `libmypaint.so` symlink used by your
compiler when it tries to find a dynamic library to link against.

2. We use prerelease suffixes at the end of the API version number
during active development to help you identify what you are building
against. The API version number of a formal release normally does not
contain any prerelease sufffix.

3. For ABI versioning, libmypaint does exactly what the GNU docs say. We
will always update some part of the ABI version number immediately
before each public release. This is done by tweaking
[configure.ac][]'s `libmypaint_abi_*` macros. ABI versions are _only_
bumped immediately before a release, and maintain their own (somewhat
weird) version sequence that's independent of the API version number.

* Rules for the ABI version number: refer to
[Updating library version information][]
in the GNU libtool manual.

[configure.ac]: ./configure.ac
[Semantic Versioning]: http://semver.org/
[Updating library version information]: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
33 changes: 0 additions & 33 deletions appveyor.bat

This file was deleted.

13 changes: 12 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ environment:
- MSYS2_ARCH: i686
MSYSTEM: MINGW32

image: Visual Studio 2017

# Set path for msys
init:
- PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;C:\msys64\bin;%PATH%
# System upgrade (must be run twice, separately, to finalize). Disabled
# for now due to build time and resource usage (500MB bw, 2.7GB disk)
# - bash -lc "/usr/bin/env pacman --noconfirm -Syu"
# - bash -lc "/usr/bin/env pacman --noconfirm -Syu"

# Fetch dependencies, build and run tests
build_script:
- '%APPVEYOR_BUILD_FOLDER%\appveyor.bat'
- bash '%APPVEYOR_BUILD_FOLDER%\appveyor_build.sh'

deploy: off
35 changes: 35 additions & 0 deletions appveyor_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

# Exit early if any command fails
set -e

PKG_PREFIX="mingw-w64-$MSYS2_ARCH"

# Install dependencies
echo "Prefix: $PKG_PREF"
pacman --noconfirm -S --needed \
base-devel \
${PKG_PREFIX}-json-c \
${PKG_PREFIX}-glib2 \
${PKG_PREFIX}-gobject-introspection


# Add m4 directories to the ACLOCAL_PATH
# Remove this if/when the underlying reason for their omission is found
for p in $(pacman --noconfirm -Ql ${PKG_PREFIX}-glib2 | # List files
grep "\.m4" | # We only care about the macro files
xargs readlink -e | # Make canonical, just in case
xargs dirname | # Strip file names from paths
sort --unique # Add each dir only once
)
do
echo "Adding additional m4 path: $p"
ACLOCAL_PATH=$p:$ACLOCAL_PATH
done

export ACLOCAL_PATH
export PWD="$APPVEYOR_BULD_FOLDER"

./autogen.sh
./configure
make distcheck
Loading

0 comments on commit 2f3fb7b

Please sign in to comment.