Subject: Re: E17 - Re: BSD licensed GUI and framebuffer
To: Chavdar Ivanov <ci4ic4@gmail.com>
From: Cliff Wright <cliff@snipe444.org>
List: netbsd-users
Date: 12/20/2007 12:52:38
Back in April I had compiled some of E17 from CVS. I made some notes to
myself at the time that others might find useful. I believe the libtool
hack I used may no longer be needed. Here are those notes:

packages needed: (some may be needed only by e)
devel/automake(depends, m4 perl autoconf)	eet(autogen.sh(aclocal))
devel/libtool-base				eet(autogen.sh)
devel/pkg-config				evas
devel/gettext(gettext-m4,lib,tools,asprintf)	e
graphics/jpeg					eet evas(?)
graphics/freetype2				evas(needs >= 9.3.0)
graphics/png					evas
graphics/libungif				evas
graphics/tiff					evas
graphics/imlib2(x11-links inputproto libltdl)	epsilon(for entrance)

# have not needed following for lib builds
# do not know if it is needed yet
setenv FREETYPE_CONFIG /usr/pkg/bin/freetype-config
To compile libs/eet
add the following patches
--- configure.in.distrib	2006-07-23 14:40:03.000000000 -0700
+++ configure.in	2006-09-07 14:38:18.000000000 -0700
@@ -70,8 +70,8 @@
 int main(int argc, char **argv) {
   char buf[4096];
   float ival = 0.1234, oval = 0.0;
-  snprintf(buf, sizeof(buf), "%a", (double)ival);
-  sscanf(buf, "%a", &oval);
+  snprintf(buf, sizeof(buf), "%f", (double)ival);
+  sscanf(buf, "%f", &oval);
   if (ival != oval) return -1;
   return 0;
 }
--- src/lib/eet_data.c.distrib	2006-06-13 03:20:22.000000000 -0700
+++ src/lib/eet_data.c	2006-09-07 14:37:24.000000000 -0700
@@ -364,7 +364,7 @@
    prev_locale = setlocale(LC_NUMERIC, "C");
 /* solaris atof is broken and doesnt understand %a format as a float
*/   
 /*   *d = (float)atof(str); */
-   sscanf(str, "%a", &tf);
+   sscanf(str, "%f", &tf);
    *d = (float)tf;
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
    
@@ -380,7 +380,7 @@
 
    s = (float *)src;
    prev_locale = setlocale(LC_NUMERIC, "C");
-   snprintf(buf, sizeof(buf), "%a", (double)(*s));
+   snprintf(buf, sizeof(buf), "%f", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
    len = strlen(buf);
    d = malloc(len + 1);
@@ -411,7 +411,7 @@
    prev_locale = setlocale(LC_NUMERIC, "C");
 /* solaris atof is broken and doesnt understand %a format as a float
*/   
 /*   *d = (double)atof(str); */
-   sscanf(str, "%a", &tf);
+   sscanf(str, "%f", &tf);
    *d = (double)tf;
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
 
@@ -427,7 +427,7 @@
 
    s = (double *)src;
    prev_locale = setlocale(LC_NUMERIC, "C");
-   snprintf(buf, sizeof(buf), "%a", (double)(*s));
+   snprintf(buf, sizeof(buf), "%f", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
    len = strlen(buf);
    d = malloc(len + 1);
---------------------------------------------------------
then use the following:
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib"
make
su root -c "make install"
note the files:
/usr/local/src/e17/apps/e/data/other/applications.tar.gz
/usr/local/share/enlightenment/data/other/applications.tar.gz
need to have rebuilt eap files

for evas
note I used below ecore -R hack for ...software_x11
NetBSD 4.0BETA2 X11 freetype version is to old (9.0.3)
need graphics/freetype2, want graphics/png, graphics/libungif,
graphics/tiff
devel/pkg-config is used
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
su root -c "make install"

for ecore
note: this does not add openssl support
modified /usr/pkg/share/libtool/ltmain.sh
  This is to allow generated libtool to handle -R flag from .la files
  dependency_libs variable
  modified to generate -R flag for libecore_x.la
--- /usr/pkg/share/libtool/ltmain.sh.distrib	2007-04-03
13:02:54.000000000 -0700
+++ /usr/pkg/share/libtool/ltmain.sh	2007-04-03 14:00:50.000000000 -0700
@@ -3074,7 +3074,22 @@
 	    # practice:
 	    case $deplib in
 	    -L*) new_libs="$deplib $new_libs" ;;
-	    -R*) ;;
+	    -R*)
+		# cliff mod to handle -R in .la files dependancy var
+		dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+		  # We need an absolute path.
+		  case $dir in
+		  [\\/]* | [A-Za-z]:[\\/]*) ;;
+		  *)
+		  $echo "$modename: only absolute run-paths are allowed" 1>&2
+		  exit $EXIT_FAILURE
+		  ;;
+		esac
+		case "$xrpath " in
+		*" $dir "*) ;;
+		*) xrpath="$xrpath $dir" ;;
+		esac
+		;;
 	    *)
 	      # And here is the reason: when a library appears more
 	      # than once as an explicit dependence of a library, or
--- src/lib/ecore_x/Makefile.am.distrib	2006-08-07 00:03:12.000000000
-0700
+++ src/lib/ecore_x/Makefile.am	2006-09-18 10:44:31.000000000 -0700
@@ -20,7 +20,9 @@
 libecore_x_la_LDFLAGS = -version-info 1:0:0 \
 -L$(top_builddir)/src/lib/ecore/.libs \
 -L$(top_builddir)/src/lib/ecore_txt/.libs \
--L$(top_builddir)/src/lib/ecore_job/.libs
+-L$(top_builddir)/src/lib/ecore_job/.libs \
+-R /usr/X11R6/lib
+# above is a hack. how is this added? cliff
 
 if BUILD_ECORE_X
 
 -----------------------------------------------------------
NetBSD old 646 for charset while 646 is not in iconv(longer names are),
so I hacked to use ISO8859-1
note, not done for 4.0beta2 yet
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
su root -c "make install"

for embryo
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
make
su root -c "make install"

for edje
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
su root -c "make install"

for efreet
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
su root -c "make install"

for e
./autogen.sh CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include
-L/usr/pkg/lib" LDFLAGS=-L/usr/pkg/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
su root -c "make install"
modify ~/.e/e/applications/menu/favorite.menu add lines
  <AppDir>/home/cliff/.e/e/applications/all</AppDir>
  <Include>
    <Filename>eterm.desktop</Filename>
    <Filename>sylpheed.desktop</Filename>
and add or create the desktop files (eterm from xterm, get sylpheed from
src)

for entrance
need libs/epeg
     libs/epsilon
     libs/esmart
need 5 patches(entrance)
src/client/main.c		screen save freeze fix
src/config/entrance_edit_main.c have getopt_long, not getopt_long_only
src/daemon/spawner.c		have getopt_long, not getopt_long_only

--- config/pam.d/entrance.distrib	2005-10-13 09:48:23.000000000 -0700
+++ config/pam.d/entrance	2007-04-04 09:22:56.000000000 -0700
@@ -1,8 +1,15 @@
-#%PAM-1.0
-auth		required	pam_nologin.so
-auth		required	pam_env.so
-auth		required	pam_unix.so nullok
-account		required	pam_unix.so
-password	required	pam_unix.so
-session		required	pam_unix.so
-session		optional	pam_console.so
+#
+# PAM configuration for the "entrance" service
+#
+
+# auth
+auth		include		display_manager
+
+# account
+account		include		display_manager
+
+# session
+session		include		display_manager
+
+# password
+password	required	pam_deny.so

--- src/client/entrance_session.c.distrib	2007-04-04 22:03:04.000000000
-0700
+++ src/client/entrance_session.c	2007-04-04 22:14:19.000000000 -0700
@@ -861,7 +861,7 @@
    else
       snprintf(buf, sizeof(buf), "%s", session_cmd);
 
-   res = execlp(shell_cmd, shell_cmd, "-l", "-c", "--", buf, NULL);
+   res = execlp(shell_cmd, shell_cmd, "-l", "-c", buf, NULL);
 
    /* Getting here means the previous didn't work * If /bin/sh isn't a
login 
       shell run /bin/sh without loading the profile * Also log a
warning
---------------------------------------------------------------------
autogen.sh --with-vt=5 (on pre 3.0 also need
    --with-xsession=/usr/X11R6/lib/X11/xdm/Xsession)
gmake, "make install"

to change theme (as root)
entrance_edit --theme "darkrock.edj"
if no pam change to crypt auth with
entrance_edit --auth 0