Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149642 - media-gfx/dcraw-8.39 doesn't respect CFLAGS and compiles in src_install()
Summary: media-gfx/dcraw-8.39 doesn't respect CFLAGS and compiles in src_install()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Wolfram Schlich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-30 11:53 UTC by Jakub Moc (RETIRED)
Modified: 2006-10-01 03:09 UTC (History)
0 users

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


Attachments
Makefile.patch (Makefile.patch,765 bytes, patch)
2006-09-30 23:34 UTC, Jakub Moc (RETIRED)
Details | Diff
dcraw-8.39.ebuild.diff (dcraw-8.39.ebuild.diff,833 bytes, patch)
2006-09-30 23:38 UTC, Jakub Moc (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2006-09-30 11:53:25 UTC
>>> Compiling source in /var/tmp/portage/dcraw-8.39/work/dcraw-8.39 ...
gcc -O3 -g -Wall -I/usr/include -I/usr/include/lcms -lm -ljpeg -llcms -o dcraw dcraw.c
gcc -O3 -g -Wall -I/usr/include -I/usr/include/lcms -o dcparse parse.c
>>> Source compiled.
>>> Test phase [not enabled]: media-gfx/dcraw-8.39

>>> Install dcraw-8.39 into /var/tmp/portage/dcraw-8.39/image/ category media-gfx
gcc -O3 -g -Wall -I/usr/include -I/usr/include/lcms -o dcparse parse.c
/usr/bin/install -d /var/tmp/portage/dcraw-8.39/image//usr/bin
/usr/bin/install dcraw /var/tmp/portage/dcraw-8.39/image//usr/bin
/usr/bin/install dcparse /var/tmp/portage/dcraw-8.39/image//usr/bin
/usr/bin/install -d /var/tmp/portage/dcraw-8.39/image//usr/share/man/man1
/usr/bin/install dcraw.1 /var/tmp/portage/dcraw-8.39/image//usr/share/man/man1
>>> Completed installing dcraw-8.39 into /var/tmp/portage/dcraw-8.39/image/

---

# emerge --info
Portage 2.1.2_pre2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 1600+
Gentoo Base System version 1.12.5
Last Sync: Sat, 30 Sep 2006 08:00:08 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17, 2.17.50.0.3, 2.17.50.0.5
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr -ftree-vectorize"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
LINGUAS="cs en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext 7zip X X509 a52 aac acl acpi alsa amr asf audiofile bash-completion berkdb bluetooth bzip2 cairo caps cddb cdparanoia cdr chroot cli crypt cscope css cups curl curlwrappers dbx dga dlloader dri dts dv dvd dvdr dvdread elibc_glibc encode ethereal exif expat fam fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb gd gdbm gif glibc-omitfp glut gmp gpm gstreamer iconv icq idn imagemagick imap imlib inifile input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_vmmouse ipv6 irda jack javascript jbig joystick jpeg jpeg2k kdeenablefinal kdehiddenvisibility kernel_linux lcms libcaca libg++ libsamplerate linguas_cs linguas_en lirc lirc_devices_cph06x lm_sensors logrotate mad maildir matroska mikmod mime mmap mmx mng mp3 mpeg musepack musicbrainz ncurses nls nodrm nptl nptlonly nsplugin nvidia offensive ogg openal opengl pam pcre pdf perl png ppds python qt3 quicktime readline real reflection samba sdl session sftplogging skey sndfile speex spell spl sse ssl svg symlink tcpd theora threads tiff truetype udev unicode urandom usb userland_GNU v4l v4l2 vcd video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vesa video_cards_vmware vorbis win32codecs wmf x264 xine xinerama xinetd xml xml2 xmlrpc xorg xosd xpm xv xvid xvmc zlib"
Unset:  CTARGET, INSTALL_MASK, LC_ALL
Comment 1 Wolfram Schlich (RETIRED) gentoo-dev 2006-09-30 14:39:46 UTC
I don't know much about Makefiles :-(

At first sight, I have no idea why make remembers that it already made 'dcraw',
but not that it already made 'parse'. Maybe because of the output file?!
Target 'dcraw' creates 'dcraw', target 'parse' creates 'dcparse'...
Enlightenment, anyone? :)

Same for the CFLAGS. I think I'd like to replace '-O3' by
'take CFLAGS from the environment'. How can this be done?
Comment 2 Sven Wegener gentoo-dev 2006-09-30 15:08:32 UTC
Make targets and dependencies are actually references to files and make remembers the state by expecting the commands for a target to create/update a file with the same name. This is true for the dcraw target, but not for the parse target, which creates dcparse instead of parse, as make expects it to do. The install target depends on parse, which doesn't exist (as the rule created dcparse) and make invokes the commands for the parse target a second time during install to create it. But the target will just create dcparse a second time and will every time the rule for parse is invoked.
Comment 3 Wolfram Schlich (RETIRED) gentoo-dev 2006-09-30 15:19:34 UTC
Ok, then I will rename the 'parse' target to 'dcparse'. Thanks for your input :)
Any hint about the CFLAGS?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-09-30 23:34:43 UTC
Created attachment 98494 [details, diff]
Makefile.patch

- fixes both issues
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-09-30 23:38:21 UTC
Created attachment 98495 [details, diff]
dcraw-8.39.ebuild.diff

- ebuild fix for crosscompile issues
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-09-30 23:50:19 UTC
Plus media-libs/lcms and media-libs/jpeg is RDEPEND as well.
Comment 7 Wolfram Schlich (RETIRED) gentoo-dev 2006-10-01 01:28:24 UTC
Thanks, Jakub!

(In reply to comment #4)
> Created an attachment (id=98494) [edit]
> Makefile.patch
> 
> - fixes both issues
> 

I don't understand this:

> -CC = gcc
> +CC += gcc

Why would one want to append 'gcc' to CC?
Wouldn't 'CC ?= gcc' be the better choice?!
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-10-01 01:32:36 UTC
(In reply to comment #7)
> Why would one want to append 'gcc' to CC?
> Wouldn't 'CC ?= gcc' be the better choice?!

Well yeah, anyway it doesn't get used, just needed something that's not hardcoded. :) See the ebuild patch, it uses CC=$(tc-getCC) instead, as it doesn't crosscompile with CC=gcc.
Comment 9 Sven Wegener gentoo-dev 2006-10-01 02:17:51 UTC
"make VAR=bar" will override a VAR = baz in the Makefile, you don't need to change it. ?= is only useful for variables passed via the environment.
Comment 10 Wolfram Schlich (RETIRED) gentoo-dev 2006-10-01 03:09:36 UTC
Committed a fixed dcraw-8.39.ebuild. You should wait some time,
as I have also modified the dcraw-8.39.tar.bz2 (the contained
Makefile).

Thanks!

@Sven: thanks for the information, I already committed the ?=
version :)