Bug 182925 - accessibility/redshift port broken on 10-STABLE
Summary: accessibility/redshift port broken on 10-STABLE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-12 16:10 UTC by Michael Moll
Modified: 2013-11-25 22:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moll freebsd_committer freebsd_triage 2013-10-12 16:10:00 UTC
I updated my workstation to 10 and reinstalled all ports. The redshift port seems to have problems with pkgng. It builds fine but the line
RUN_DEPENDS+=  ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:${PORTSDIR}/x11-toolkits/py-gtk2
Is leading to...
===>  Installing for redshift-1.7_1
===>   redshift-1.7_1 depends on file: /gtk-2.0/gtk/__init__.py - not found
===>    Verifying install for /gtk-2.0/gtk/__init__.py in /usr/ports/x11-toolkits/py-gtk2
[...]
py-gtk2 is already installed on the system, so this fails. To get thingsgoing, I commented RUN_DEPENDS+ out, then redshift installs (and works) but:
===>   Registering installation for redshift-1.7_1
pkg-static: lstat(/usr/local/lib/python2.6/site-packages/gtk_redshift/__init__.py): No such file or directory
pkg-static: lstat(/usr/local/lib/python2.6/site-packages/gtk_redshift/__init__.pyc): No such file or directory
pkg-static: lstat(/usr/local/lib/python2.6/site-packages/gtk_redshift/__init__.pyo): No such file or directory
[...]

How-To-Repeat: On a system with FreeBSD 10 do:
cd /usr/ports/accessibility/redshift
make install
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-10-12 16:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->feld

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mark Felder freebsd_committer freebsd_triage 2013-10-29 15:55:48 UTC
Hello,

I cannot seem to reproduce this. It builds without issue in poudriere
testport, and I have reinstalled it on my 10-BETA desktop. I did notice
you're still running python 2.6, which hasn't been the default for quite
some time. I wonder if your system has some inconsistency issues?
Comment 3 Michael Moll freebsd_committer freebsd_triage 2013-10-29 21:44:05 UTC
Hi,

On Tue, Oct 29, 2013 at 10:55:48AM -0500, Mark Felder wrote:
> I cannot seem to reproduce this. It builds without issue in poudriere
> testport, and I have reinstalled it on my 10-BETA desktop. I did notice
> you're still running python 2.6, which hasn't been the default for quite
> some time. I wonder if your system has some inconsistency issues?

Hm, very interesting. I still have those problem. After Upgrading the
system to 10 I deleted all ports and reinstalled them, the installed
version of python is 2.7, I have no idea where the 2.6 is coming from.
Comment 4 Michael Moll freebsd_committer freebsd_triage 2013-10-30 17:43:55 UTC
Another data-point: when I deselct the "GUI" option, everything is fine.
Comment 5 sadsfae 2013-10-31 14:07:33 UTC
Hey Folks,

I have the same issue with 9.1-RELEASE and a fresh ports tree.

-will
Comment 6 eeconn 2013-11-24 00:30:40 UTC
It looks like what's happening is that it's looking in the wrong 
location for the python files:
===>   redshift-1.7_1 depends on file: /xdg/__init__.py - not found
===>    Verifying install for /xdg/__init__.py in /usr/ports/devel/py-xdg

[erin@minotaur] /usr/ports/accessibility/redshift/work/redshift-1.7$ ls 
/usr/local/lib/python2.7/site-packages/xdg/__init__.py
/usr/local/lib/python2.7/site-packages/xdg/__init__.py


It seems like a path isn't getting properly expanded so it's looking in 
/ instead of in the installed python's site-packages directory.

It then goes and tries to reinstall py27-xdg again (same for py27-gtk2), 
which either fails if I don't have FORCE_PKG_REGISTER set since it's 
already installed, or goes through to this point:
===>  Installing for redshift-1.7_1
===>   Registering installation for redshift-1.7_1
pkg-static: 
lstat(/usr/ports/accessibility/redshift/work/stage/usr/local/lib/python2.6/site-packages/gtk_redshift/__init__.py): 
No such file or directory


I have no idea why it's looking in python2.6. python2.7 directory exists:
[erin@minotaur] /usr/ports/accessibility/redshift/work$ ls 
stage/usr/local/lib
X11       python2.7


And the files it's looking for reside in the python2.7 directory:
[erin@minotaur] /usr/ports/accessibility/redshift/work$ ls 
stage/usr/local/lib/python2.7/site-packages/gtk_redshift/__init__.py
stage/usr/local/lib/python2.7/site-packages/gtk_redshift/__init__.py



I have python 2.7 and do not have any python 2.6 packages installed. 
9.1-STABLE with a fresh ports tree.
[erin@minotaur] /usr/ports/accessibility/redshift/work$ pkg info |grep py26
[erin@minotaur] /usr/ports/accessibility/redshift/work$ pkg info python
python-2.7_1,2


I'm not well-versed enough in autoconf to figure out where the problem 
might be, but I hope this helps shed some light on the problem.
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-11-25 22:47:07 UTC
Author: feld
Date: Mon Nov 25 22:47:00 2013
New Revision: 334904
URL: http://svnweb.freebsd.org/changeset/ports/334904

Log:
  Fix building with the GUI option
  Split the Gnome clock integration into its own option
  
  PR:		ports/182925
  Approved by:	swills (mentor)

Modified:
  head/accessibility/redshift/Makefile
  head/accessibility/redshift/pkg-plist

Modified: head/accessibility/redshift/Makefile
==============================================================================
--- head/accessibility/redshift/Makefile	Mon Nov 25 22:46:28 2013	(r334903)
+++ head/accessibility/redshift/Makefile	Mon Nov 25 22:47:00 2013	(r334904)
@@ -18,10 +18,11 @@ INSTALLS_ICONS=	yes
 
 CONFIGURE_ARGS+=	--disable-wingdi
 
-OPTIONS_DEFINE=	GUI NLS RANDR VIDMODE
+OPTIONS_DEFINE=	GNOME GUI NLS RANDR VIDMODE
 OPTIONS_DEFAULT=	RANDR
 
-GUI_DESC=	Tray icon and location via Gnome clock
+GNOME_DESC=	GNOME clock support
+GUI_DESC=	Tray icon
 RANDR_DESC=	Support RANDR for changing colors
 VIDMODE_DESC=	Support VIDMODE for changing colors (NVIDIA)
 
@@ -51,13 +52,24 @@ CONFIGURE_ARGS+=--disable-vidmode
 .endif
 
 .if ${PORT_OPTIONS:MGUI}
-CONFIGURE_ARGS+=--enable-gui --enable-gnome-clock
-RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:${PORTSDIR}/x11-toolkits/py-gtk2 \
-		${PYTHON_SITELIBDIR}/xdg/__init__.py:${PORTSDIR}/devel/py-xdg
+USE_PYTHON=	yes
+CONFIGURE_ARGS+=--enable-gui
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}gtk2>0:${PORTSDIR}/x11-toolkits/py-gtk2 \
+		${PYTHON_PKGNAMEPREFIX}xdg>0:${PORTSDIR}/devel/py-xdg
 PLIST_SUB+=	GUI=""
 .else
-CONFIGURE_ARGS+=--disable-gui --disable-gnome-clock
+CONFIGURE_ARGS+=--disable-gui
 PLIST_SUB+=	GUI="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MGNOME}
+CONFIGURE_ARGS+=--enable-gnome-clock
+BUILD_DEPENDS+=	glib>0:${PORTSDIR}/devel/glib20 \
+		gconf2>0:${PORTSDIR}/devel/gconf2
+RUN_DEPENDS+=	glib>0:${PORTSDIR}/devel/glib20 \
+		gconf2>0:${PORTSDIR}/devel/gconf2
+.else
+CONFIGURE_ARGS+=--disable-gnome-clock
+.endif
+
 .include <bsd.port.mk>

Modified: head/accessibility/redshift/pkg-plist
==============================================================================
--- head/accessibility/redshift/pkg-plist	Mon Nov 25 22:46:28 2013	(r334903)
+++ head/accessibility/redshift/pkg-plist	Mon Nov 25 22:47:00 2013	(r334904)
@@ -23,21 +23,21 @@ share/icons/hicolor/scalable/apps/redshi
 %%NLS%%share/locale/ru/LC_MESSAGES/redshift.mo
 %%NLS%%share/locale/zh_CN/LC_MESSAGES/redshift.mo
 %%GUI%%bin/gtk-redshift
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/__init__.py
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/__init__.pyc
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/__init__.pyo
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/defs.py
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/defs.pyc
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/defs.pyo
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/statusicon.py
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/statusicon.pyc
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/statusicon.pyo
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/utils.py
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/utils.pyc
-%%GUI%%lib/python2.6/site-packages/gtk_redshift/utils.pyo
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/__init__.py
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/__init__.pyc
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/__init__.pyo
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/defs.py
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/defs.pyc
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/defs.pyo
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/statusicon.py
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/statusicon.pyc
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/statusicon.pyo
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/utils.py
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/utils.pyc
+%%GUI%%%%PYTHON_SITELIBDIR%%/gtk_redshift/utils.pyo
 %%GUI%%share/applications/gtk-redshift.desktop
 @dirrmtry share/icons/hicolor/scalable/apps
 @dirrmtry share/icons/hicolor/scalable
 @dirrmtry share/icons/hicolor
 @dirrmtry share/icons
-%%GUI%%@dirrmtry lib/python2.6/site-packages/gtk_redshift
+%%GUI%%@dirrmtry %%PYTHON_SITELIBDIR%%/gtk_redshift
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Mark Felder freebsd_committer freebsd_triage 2013-11-25 22:47:53 UTC
State Changed
From-To: open->closed

Patch committed.