Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258895 - sfml-1.4.ebuild (New Package) - Simple and fast multimedia library
Summary: sfml-1.4.ebuild (New Package) - Simple and fast multimedia library
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Default Assignee for New Packages
URL: http://sfml.sourceforge.net/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-14 00:00 UTC by matt
Modified: 2011-02-07 12:21 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sfml-1.4.ebuild (New Package) (sfml-1.4.ebuild,786 bytes, text/plain)
2009-02-14 00:02 UTC, matt
Details
Patch for 1.4-r1 ebuild candidate (libsfml-1.4-destdir.patch,2.66 KB, patch)
2009-02-16 22:35 UTC, Sebastian Pipping
Details | Diff
1.4-r1 ebuild candidate (libsfml-1.4-r1.ebuild,878 bytes, text/plain)
2009-02-16 22:36 UTC, Sebastian Pipping
Details
Patch for 1.4-r1 ebuild candidate (libsfml-1.4-destdir.patch,2.73 KB, patch)
2009-02-17 17:25 UTC, Sebastian Pipping
Details | Diff
Adds proper support for DESTDIR and prefix (libsfml-1.4-destdir-r3.patch,4.41 KB, patch)
2009-02-20 14:11 UTC, Sebastian Pipping
Details | Diff
Adds proper support for DESTDIR and prefix (libsfml-1.4-destdir-r3.patch,4.53 KB, patch)
2009-02-20 14:20 UTC, Sebastian Pipping
Details | Diff
Removes bundled libpng, libjpeg, GLEW and zlib (libsfml-1.4-deps.patch,2.84 KB, patch)
2009-02-20 15:02 UTC, Sebastian Pipping
Details | Diff
1.4-r2 ebuild candidate (libsfml-1.4-r2.ebuild,973 bytes, text/plain)
2009-02-20 15:04 UTC, Sebastian Pipping
Details
Removes bundled libpng, libjpeg, GLEW and zlib (libsfml-1.4-deps.patch,2.68 KB, patch)
2009-02-20 17:56 UTC, Sebastian Pipping
Details | Diff
Ebuild for libsfml-1.6 (libsfml-1.6.ebuild,899 bytes, text/plain)
2010-07-16 01:57 UTC, Tim Harder
Details
Fix CFLAGS and use system libs (libsfml-1.6-deps-and-cflags.patch,4.03 KB, patch)
2010-07-16 02:01 UTC, Tim Harder
Details | Diff
Add destdir support (libsfml-1.6-destdir.patch,4.65 KB, patch)
2010-07-16 02:02 UTC, Tim Harder
Details | Diff
Fix to download the correct version, x86 versus amd64 (libsfml-1.6-r1.ebuild,1009 bytes, text/plain)
2011-01-05 14:37 UTC, Sven Eden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matt 2009-02-14 00:00:33 UTC
i updated and fixed up sfml-1.2.ebuild i found on the web (google cache) with the help from #gentoo-dev-help and the forums.  http://forums.gentoo.org/viewtopic-p-5475974.html#5475974

sfml is a simple and fast light media library similar to sdl.  http://www.sfml-dev.org/
Comment 1 matt 2009-02-14 00:02:13 UTC
Created attachment 181916 [details]
sfml-1.4.ebuild (New Package)
Comment 2 matt 2009-02-14 00:29:21 UTC
ok, i found a problem.  the ebuild submitted has
emake install DESTDIR="${D}"/usr || die
but that installs to a double /usr, so i removed the /usr
emake install DESTDIR="${D}" || die
that installs fine, but now have QA problems.

 * QA Notice: Found an absolute symlink in a library directory:
 *            usr/lib/libsfml-audio.so -> /var/tmp/portage/media-libs/sfml-1.4/image//usr/lib/libsfml-audio.so.1.4
 *            It should be a relative symlink if in the same directory
 *            or a linker script if it crosses the /usr boundary.
 
 * QA Notice: Found an absolute symlink in a library directory:
 *            usr/lib/libsfml-graphics.so -> /var/tmp/portage/media-libs/sfml-1.4/image//usr/lib/libsfml-graphics.so.1.4
 *            It should be a relative symlink if in the same directory
 *            or a linker script if it crosses the /usr boundary.
 
 * QA Notice: Found an absolute symlink in a library directory:
 *            usr/lib/libsfml-network.so -> /var/tmp/portage/media-libs/sfml-1.4/image//usr/lib/libsfml-network.so.1.4
 *            It should be a relative symlink if in the same directory
 *            or a linker script if it crosses the /usr boundary.
 
 * QA Notice: Found an absolute symlink in a library directory:
 *            usr/lib/libsfml-system.so -> /var/tmp/portage/media-libs/sfml-1.4/image//usr/lib/libsfml-system.so.1.4
 *            It should be a relative symlink if in the same directory
 *            or a linker script if it crosses the /usr boundary.
 
 * QA Notice: Found an absolute symlink in a library directory:
 *            usr/lib/libsfml-window.so -> /var/tmp/portage/media-libs/sfml-1.4/image//usr/lib/libsfml-window.so.1.4
 *            It should be a relative symlink if in the same directory
 *            or a linker script if it crosses the /usr boundary.

these were the errors from the ebuild i found online for version 1.2.  i was trying to fix these errors by fixing the makefile with the 3 sed lines.

i am not sure what needs to be done to fix this
Comment 3 Sebastian Pipping gentoo-dev 2009-02-16 22:35:39 UTC
Created attachment 182281 [details, diff]
Patch for 1.4-r1 ebuild candidate
Comment 4 Sebastian Pipping gentoo-dev 2009-02-16 22:36:53 UTC
Created attachment 182282 [details]
1.4-r1 ebuild candidate
Comment 5 matt 2009-02-16 23:16:55 UTC
i looked at your patch and that doenst use prefix ?  that needs to be added so that this can also work with gentoo-prefix and be a correct makefile.
Comment 6 Sebastian Pipping gentoo-dev 2009-02-17 17:25:03 UTC
Created attachment 182344 [details, diff]
Patch for 1.4-r1 ebuild candidate

I fixed the patch so it has more upstream potential.

Can you elaborate on the use of prefix, maybe point me to some docs?
Comment 7 Elias Pipping 2009-02-17 21:07:36 UTC
quoting from the patch:

+ifeq (x$(DESTDIR), x)
+    export DESTDIR = /usr/local
+endif

that looks like a really bad idea. the idea of a DESTDIR is that i can install stuff to a temporary location instead of directly installing into the system and move the files where they belong afterwards (after inspecting and possibly altering the results of the installation).

so e.g. it would make sense to have a PREFIX=/usr/local, and DESTDIR=/var/tmp/foo, such that files that go to bin/mybin, or /usr/local/bin/mybin given our prefix, end up in /var/tmp/foo/usr/local/bin/mybin, which is just $DESTDIR$PREFIX/bin/mybin, first. Now. if I leave DESTDIR empty, that means I want to install directly into my system. If you set DESTDIR to /usr/local, the files would end up in $DESTDIR$PREFIX, which is /usr/local/usr/local which is most definitely a place I wouldn't want them to be.
Comment 8 Elias Pipping 2009-02-17 21:10:57 UTC
on a sidenote, this is not shell. you can just use ifeq($(FOO),) to check if FOO is empty.
Comment 9 Elias Pipping 2009-02-17 21:12:40 UTC
you can also check if a variable is undefined, using the origin command, like this:

  ifeq ($(origin FOO), undefined)

for more, see http://www.gnu.org/software/make/manual/make.html
Comment 10 Sebastian Pipping gentoo-dev 2009-02-20 14:11:08 UTC
Created attachment 182658 [details, diff]
Adds proper support for DESTDIR and prefix

How about this one?
Comment 11 Sebastian Pipping gentoo-dev 2009-02-20 14:20:23 UTC
Created attachment 182660 [details, diff]
Adds proper support for DESTDIR and prefix

Same *** but with dos2unix after.  Now it at least works here #&]$%!
Comment 12 Sebastian Pipping gentoo-dev 2009-02-20 15:02:45 UTC
Created attachment 182665 [details, diff]
Removes bundled libpng, libjpeg, GLEW and zlib
Comment 13 Sebastian Pipping gentoo-dev 2009-02-20 15:04:42 UTC
Created attachment 182667 [details]
1.4-r2 ebuild candidate 

libsfml seems to be a bring-everything library: they ship their own libjpeg, libpng, and a few more. They new ebuild adds another patch to use libs from the system, instead For now the remaining two exceptions are "SOIL" and "stb_vorbis" for which no ebuilds seem to exist, yet.
Comment 14 Sebastian Pipping gentoo-dev 2009-02-20 17:56:24 UTC
Created attachment 182674 [details, diff]
Removes bundled libpng, libjpeg, GLEW and zlib

Fixed: Part of the destdir patch made it in here as well by mistake.
Comment 15 matt 2009-02-20 21:12:30 UTC
i just sfml-1.4-r2, it builds and installs fine.  should the headers be in a folder? /usr/include/SFML/*.hpp

right now it is just 
/usr/include/*.hpp    #and subfolders
Comment 16 Sebastian Pipping gentoo-dev 2009-02-20 22:34:45 UTC
(In reply to comment #15)
> i just sfml-1.4-r2, it builds and installs fine.  should the headers be in a
> folder? /usr/include/SFML/*.hpp

Good idea.  I made it $(prefix)/include/sfml/ though, as lowercase seems to be more common in there.  Please get sfml-1.4-r3 from my playground overlay:
http://git.goodpoint.de/?p=overlay-sping.git;a=tree;f=media-libs/libsfml;hb=HEAD
Comment 17 matt 2009-02-22 20:55:55 UTC
i dont think lowercase will work.  http://www.sfml-dev.org/documentation/1.4/  shows an example with #include <SFML/Graphics.hpp>, the documentation uses uppercase, i think that is what should be used.
Comment 18 Sebastian Pipping gentoo-dev 2009-02-22 22:45:39 UTC
(In reply to comment #17)
> [..] the documentation uses uppercase, i think that is what should be used.

libsfml-1.4-r4 is using uppercase again.
Comment 19 matt 2009-03-06 20:30:29 UTC
sping i just tried sfml-1.4-r4.ebuild.   the patch fails, is the patch broke or did i do something stupid ?

noose sfml # cat /var/tmp/portage/media-libs/sfml-1.4-r4/temp/sfml-1.4-destdir-r5.patch-32639.out
***** sfml-1.4-destdir-r5.patch *****

=====================================

PATCH COMMAND:   patch -p0 -g0 -E --no-backup-if-mismatch < /usr/local/portage/overlay-local/media-libs/sfml/files/sfml-1.4-destdir-r5.patch

=====================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/SFML/Audio/Makefile b/src/SFML/Audio/Makefile
|index 109a00a..f55c280 100755
|--- a/src/SFML/Audio/Makefile
|+++ b/src/SFML/Audio/Makefile
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 24
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------




noose sfml # ls -l
total 20
-rw-r--r-- 1 root root 1787 Mar  6 14:00 Manifest
drwxr-xr-x 2 root root  184 Mar  6 14:00 files
-rw-r--r-- 1 root root  891 Feb  2 17:13 sfml-1.2.ebuild
-rw-r--r-- 1 root root  973 Feb 20 14:50 sfml-1.4-r2.ebuild
-rw-r--r-- 1 root root  917 Mar  6 13:59 sfml-1.4-r4.ebuild
-rw-r--r-- 1 root root  824 Feb 13 18:27 sfml-1.4.ebuild



noose sfml # ls -l files/
total 20
-rw-r--r-- 1 root root 2744 Feb 20 15:00 sfml-1.4-deps.patch
-rw-r--r-- 1 root root 4643 Feb 20 14:58 sfml-1.4-destdir-r3.patch
-rw-r--r-- 1 root root 4517 Mar  6 14:00 sfml-1.4-destdir-r5.patch
Comment 20 matt 2009-03-06 22:09:43 UTC
doh.  i didnt grab the patch correctly.  the source is littered with windows line endings and the patch has those too.

 wget -O sfml-1.4-destdir-r5.patch 'http://git.goodpoint.de/?p=overlay-sping.git;a=blob_plain;f=media-libs/libsfml/files/libsfml-1.4-destdir-r5.patch;hb=HEAD'

solved this problem.
Comment 21 niogic 2010-07-16 01:31:06 UTC
When will this be merged?

In roslin overlay the ebuild has been broken for a loong time!
Comment 22 Tim Harder gentoo-dev 2010-07-16 01:54:07 UTC
(In reply to comment #21)
> When will this be merged?
> 
> In roslin overlay the ebuild has been broken for a loong time!

Not to mention that version 1.6 has been out for awhile. I'll attach an updated ebuild and patches for it shortly.

Comment 23 Tim Harder gentoo-dev 2010-07-16 01:57:19 UTC
Created attachment 238973 [details]
Ebuild for libsfml-1.6

Ebuild for media-libs/libsfml-1.6.
Comment 24 Tim Harder gentoo-dev 2010-07-16 02:01:02 UTC
Created attachment 238977 [details, diff]
Fix CFLAGS and use system libs

Fix CFLAGS and use system libraries.
Comment 25 Tim Harder gentoo-dev 2010-07-16 02:02:06 UTC
Created attachment 238979 [details, diff]
Add destdir support

Add support for DESTDIR
Comment 26 Sven Eden 2011-01-05 14:37:43 UTC
Created attachment 258929 [details]
Fix to download the correct version, x86 versus amd64

This is the libsfml-1.6.ebuild with added detection for the right bit version of the package. I have tested it briefly on my amd64 machine, and events, windows, timings and OpenGL work as far as I can see.

btw: As SFML is something like a "new generation SDL", will it eventually enter portage or at least sunrise ?
Comment 27 Tim Harder gentoo-dev 2011-02-05 05:40:33 UTC
Added to CVS.
Comment 28 Sven Eden 2011-02-07 12:19:10 UTC
The ebuild in portage does not download the right archives on 64bit systems. It downloads and tries to compile the 32bit version.
Comment 29 Tim Harder gentoo-dev 2011-02-07 12:21:38 UTC
(In reply to comment #28)
> The ebuild in portage does not download the right archives on 64bit systems. It
> downloads and tries to compile the 32bit version.

The 32bit and 64bit downloads are exactly the same except for the pre-compiled libraries that are packaged in the tarballs. Since this is Gentoo, we disregard the pre-compiled libraries and build our own so it doesn't matter which archive gets downloaded.