Skip to content

Commit 2f3fb7b

Browse files
committed
Merge v1.6.0 updates into libmypaint-v1
2 parents e5264c3 + 108516e commit 2f3fb7b

File tree

169 files changed

+85226
-8846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+85226
-8846
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ autom4te.cache/
3939
.libs/
4040
*.lo
4141

42-
libmypaint.la
43-
gegl/libmypaint-gegl.la
42+
libmypaint-*.la
43+
gegl/libmypaint-gegl-*.la
4444

4545
po/*.gmo
4646
po/Makefile*

Makefile.am

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ INTROSPECTION_SCANNER_ARGS = \
1313
--warn-all \
1414
--pkg="glib-2.0" \
1515
--namespace="MyPaint" \
16-
--nsversion="$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION)" \
16+
--nsversion="$(LIBMYPAINT_API_PLATFORM_VERSION)" \
1717
--identifier-prefix="MyPaint" \
1818
--symbol-prefix="mypaint_" \
1919
--add-include-path="$(srcdir)" \
@@ -31,18 +31,21 @@ MyPaint_introspectable_headers = \
3131
mypaint-rectangle.h \
3232
mypaint-surface.h \
3333
mypaint-tiled-surface.h \
34+
fastapprox/fastpow.h \
35+
fastapprox/sse.h \
36+
fastapprox/fastexp.h \
37+
fastapprox/cast.h \
38+
fastapprox/fastlog.h \
3439
$(libmypaint_glib)
3540

3641
if HAVE_INTROSPECTION
3742

3843
introspection_sources = \
3944
$(MyPaint_introspectable_headers) \
4045
brushmodes.c \
41-
libmypaint.c \
4246
mypaint-brush-settings.c \
4347
mypaint-rectangle.c \
4448
operationqueue.c \
45-
utils.c \
4649
fifo.c \
4750
mypaint-mapping.c \
4851
mypaint.c \
@@ -54,12 +57,13 @@ introspection_sources = \
5457
mypaint-tiled-surface.c \
5558
tilemap.c
5659

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

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

7882
pkgconfig_DATA = libmypaint.pc
7983

80-
## libmypaint ##
84+
## libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@ ##
8185

82-
AM_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS)
86+
AM_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(OPENMP_CFLAGS)
8387

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

@@ -90,12 +94,15 @@ libmypaint_la_LDFLAGS = \
9094
-version-info @LIBMYPAINT_ABI_VERSION_INFO@ \
9195
-no-undefined
9296

97+
9398
libmypaint_publicdir = $(includedir)/libmypaint
9499

95100
nobase_libmypaint_public_HEADERS = \
96101
mypaint-config.h \
97102
mypaint-glib-compat.h \
98103
mypaint-mapping.h \
104+
mypaint-matrix.h \
105+
mypaint-symmetry.h \
99106
$(MyPaint_introspectable_headers)
100107

101108
LIBMYPAINT_SOURCES = \
@@ -109,17 +116,18 @@ LIBMYPAINT_SOURCES = \
109116
mypaint-brush.c \
110117
mypaint-brush-settings.c \
111118
mypaint-fixed-tiled-surface.c \
119+
mypaint-matrix.c \
120+
mypaint-symmetry.c \
112121
mypaint-rectangle.c \
113122
mypaint-surface.c \
114123
mypaint-tiled-surface.c \
115124
operationqueue.c \
116125
rng-double.c \
117-
tilemap.c \
118-
utils.c
126+
tilemap.c
119127

120128
libmypaint_la_SOURCES = $(libmypaint_public_HEADERS) $(LIBMYPAINT_SOURCES)
121129

122-
DISTCLEANFILES = MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir.files
130+
DISTCLEANFILES = MyPaint-@LIBMYPAINT_API_PLATFORM_VERSION@.gir.files
123131

124132
EXTRA_DIST = \
125133
brushsettings.json \
@@ -133,12 +141,10 @@ EXTRA_DIST = \
133141
fifo.h \
134142
generate.py \
135143
helpers.h \
136-
libmypaint.c \
137144
operationqueue.h \
138145
rng-double.h \
139146
tiled-surface-private.h \
140147
tilemap.h \
141-
utils.h \
142148
glib/mypaint-brush.c
143149

144150
if HAVE_I18N

README.md

100755100644
Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# libmypaint - MyPaint brush engine library
22

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

@@ -35,25 +35,39 @@ to get started with a standard configuration:
3535

3636
When building from git:
3737

38-
$ sudo apt install -y python2.7 autotools-dev intltool gettext libtool
38+
$ sudo apt install -y python autotools-dev intltool gettext libtool
39+
40+
You might also try using your package manager:
41+
42+
$ sudo apt build-dep mypaint # will get additional deps for MyPaint (GUI)
43+
$ sudo apt build-dep libmypaint # may not exist; included in mypaint
3944

4045
### Install dependencies (Red Hat and derivatives)
4146

4247
The following works on a minimal CentOS 7 installation:
4348

44-
# yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel
49+
$ sudo yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel
4550

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

48-
# yum install -y git python autoconf intltool gettext libtool
53+
$ sudo yum install -y git python autoconf intltool gettext libtool
54+
55+
You might also try your package manager:
56+
57+
$ sudo yum builddep libmypaint
4958

5059
## Build and install
5160

61+
MyPaint and libmypaint benefit dramatically from autovectorization and other compiler optimizations.
62+
You may want to set your CFLAGS before compiling (for gcc):
63+
64+
$ export CFLAGS='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'
65+
5266
The traditional setup works just fine.
5367

5468
$ ./autogen.sh # Only needed when building from git.
5569
$ ./configure
56-
$ make install
70+
$ sudo make install
5771
$ sudo ldconfig
5872

5973
### Maintainer mode
@@ -96,7 +110,7 @@ This runs all the unit tests.
96110

97111
### Install
98112

99-
$ make install
113+
$ sudo make install
100114

101115
Uninstall libmypaint with `make uninstall`.
102116

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

112-
$ echo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >>/etc/environment
126+
$ sudo sh -c "echo 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' >>/etc/environment"
127+
128+
Make sure ldconfig can see libmypaint as well
129+
130+
$ sudo ldconfig -p |grep -i libmypaint
131+
132+
If it's not found, you'll need to add the relevant lib directory to
133+
the LD_LIBRARY_PATH:
113134

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

116-
$ echo '/usr/local/lib' > /etc/ld.so.conf.d/usrlocal.conf
138+
Alternatively, you may want to enable /usr/local for libraries. Arch and Redhat derivatives:
139+
140+
$ sudo sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/usrlocal.conf"
141+
$ sudo ldconfig
117142

118143
## Contributing
119144

VERSIONING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# API and ABI versioning policy
2+
3+
libMyPaint cannot afford to be sloppy about its version numbers because
4+
other projects depend on it.
5+
6+
API versions on `master` increment ahead of the upcoming release
7+
as and when features and changes are added. ABI versions are always
8+
updated immediately before each release, and _only_ then.
9+
10+
1. The `master` branch contains the _future release_'s API version
11+
number. This version number is updated as and when new features and
12+
API changes are committed to the master branch. Do this by updating
13+
[configure.ac][]'s `libmypaint_api_*` macros as part of your commit.
14+
The reference point for these updates is the current stable release's
15+
version number.
16+
17+
* Rules for the API version number: libmypaint uses
18+
[Semantic Versioning][].
19+
20+
* Note that the major and minor components of the API version number
21+
form part of the _soname_ for binary library files used at runtime,
22+
but they're not part of the `libmypaint.so` symlink used by your
23+
compiler when it tries to find a dynamic library to link against.
24+
25+
2. We use prerelease suffixes at the end of the API version number
26+
during active development to help you identify what you are building
27+
against. The API version number of a formal release normally does not
28+
contain any prerelease sufffix.
29+
30+
3. For ABI versioning, libmypaint does exactly what the GNU docs say. We
31+
will always update some part of the ABI version number immediately
32+
before each public release. This is done by tweaking
33+
[configure.ac][]'s `libmypaint_abi_*` macros. ABI versions are _only_
34+
bumped immediately before a release, and maintain their own (somewhat
35+
weird) version sequence that's independent of the API version number.
36+
37+
* Rules for the ABI version number: refer to
38+
[Updating library version information][]
39+
in the GNU libtool manual.
40+
41+
[configure.ac]: ./configure.ac
42+
[Semantic Versioning]: http://semver.org/
43+
[Updating library version information]: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

appveyor.bat

Lines changed: 0 additions & 33 deletions
This file was deleted.

appveyor.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ environment:
55
- MSYS2_ARCH: i686
66
MSYSTEM: MINGW32
77

8+
image: Visual Studio 2017
9+
10+
# Set path for msys
11+
init:
12+
- PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;C:\msys64\bin;%PATH%
13+
# System upgrade (must be run twice, separately, to finalize). Disabled
14+
# for now due to build time and resource usage (500MB bw, 2.7GB disk)
15+
# - bash -lc "/usr/bin/env pacman --noconfirm -Syu"
16+
# - bash -lc "/usr/bin/env pacman --noconfirm -Syu"
17+
18+
# Fetch dependencies, build and run tests
819
build_script:
9-
- '%APPVEYOR_BUILD_FOLDER%\appveyor.bat'
20+
- bash '%APPVEYOR_BUILD_FOLDER%\appveyor_build.sh'
1021

1122
deploy: off

appveyor_build.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
3+
# Exit early if any command fails
4+
set -e
5+
6+
PKG_PREFIX="mingw-w64-$MSYS2_ARCH"
7+
8+
# Install dependencies
9+
echo "Prefix: $PKG_PREF"
10+
pacman --noconfirm -S --needed \
11+
base-devel \
12+
${PKG_PREFIX}-json-c \
13+
${PKG_PREFIX}-glib2 \
14+
${PKG_PREFIX}-gobject-introspection
15+
16+
17+
# Add m4 directories to the ACLOCAL_PATH
18+
# Remove this if/when the underlying reason for their omission is found
19+
for p in $(pacman --noconfirm -Ql ${PKG_PREFIX}-glib2 | # List files
20+
grep "\.m4" | # We only care about the macro files
21+
xargs readlink -e | # Make canonical, just in case
22+
xargs dirname | # Strip file names from paths
23+
sort --unique # Add each dir only once
24+
)
25+
do
26+
echo "Adding additional m4 path: $p"
27+
ACLOCAL_PATH=$p:$ACLOCAL_PATH
28+
done
29+
30+
export ACLOCAL_PATH
31+
export PWD="$APPVEYOR_BULD_FOLDER"
32+
33+
./autogen.sh
34+
./configure
35+
make distcheck

0 commit comments

Comments
 (0)