[Debichem-devel] vmd

fulvio ciriaco oivulf at gmail.com
Sun Nov 13 10:43:48 UTC 2011


Dear debichem staff,
I tried to use the debichem debian rules to build the vmd
package on linux-amd64 testing but I met some problems.
Two reasons:
a. the accluded patch to build.csh is not general enough
b. the vmd configure script needs patching
@@ -1041,7 +1041,7 @@
 $system_include       = "-I.";
 $system_library       = "";
 if ( $config_gcc ) {
-  $system_libs        = "-ll -lm";
+  $system_libs        = " -lm";
 } else {
   $system_libs        = "-lm";
 }
@@ -1991,7 +1991,7 @@
 
     $arch_lex		= "flex"; # has problems with vendor lex
     $opengl_libs	= "-L/usr/X11R6/lib64 -lGL -lGLU -lX11";
-    $mesa_libs          = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib64 -lXext -lX11";
+    $mesa_libs          = "-lGL -lGLU -L/usr/X11R6/lib64 -lXext -lX11";
 
     # this is to make tcl happy
     # also needed for plugins

    as libl.{a,so} is not available nor needed as of any
    recent distribution and libMesaGL is called libGL 

Enclosed find a rewritten rules file that
a. works with the configure patching mentioned above
b. does not make use of build.csh and removes dependency
   on tcsh, I suppose, and the need for the build.csh patch
Best regards
Fulvio Ciriaco
-------------- next part --------------
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

ifeq (Linux,$(shell uname -s))
KERNEL=LINUX
else
KERNEL="--help unknown_kernel "
endif
ifeq (x86_64,$(shell uname -m))
PLATFORM=AMD64
else
ifeq (i686,$(shell uname -m))
PLATFORM=""
else
PLATFORM=" --help unknown_machine"
endif
endif

%:
	dh $@ 

export VMDINSTALLBINDIR=/usr/bin
export VMDINSTALLLIBRARYDIR=/usr/lib/vmd
export TCL_INCLUDE_DIR=/usr/include/tcl
DESTDIR=$(CURDIR)/debian/vmd/

override_dh_auto_clean:
	$(MAKE) -C src veryclean 
	rm -rf $(KERNEL)$(PLATFORM)
	dh_auto_clean

override_dh_auto_configure:
	#FREEBSD FREEBSDAMD64 HPUX11 AIX4 AIX5 AIX5_64 AIX6_64 BLUEWATERS LINUX LINUXALPHA LINUXAMD64 LINUXIA64 LINUXPPC LINUXPPC64 MACOSX MACOSXX86 MACOSXX86_64 TRU64 SOLARIS2 SOLARIS2_64 SOLARISX86 SOLARISX86_64 WIN32 WIN64)
	echo "Compiling plugins first"
	cd plugins_source && make $(KERNEL)$(PLATFORM) TCLINC=-I$(TCL_INCLUDE_DIR) \
	  TCLLIB="-L/usr/lib"
	-cd plugins_source && PLUGINDIR=`pwd`/../plugins make distrib
	echo "Setting link from ../plugins to plugins to help compilation"
	#ln -s $(CURDIR)/plugins_source ../plugins
	echo "Now configuring core VMD"
	VMDINSTALLBINDIR=$(DESTDIR)$(VMDINSTALLBINDIR) \
	VMDINSTALLLIBRARYDIR=$(DESTDIR)$(VMDINSTALLLIBRARYDIR) \
	TCL_INCLUDE_DIR=/usr/include/tcl8.5 \
	./configure $(KERNEL)$(PLATFORM) NOSTATICPLUGINS GCC TCL TK FLTK MESA

override_dh_auto_build:
	$(MAKE) -C src 
	ln -f ./$(KERNEL)$(PLATFORM)/vmd_$(KERNEL)$(PLATFORM) bin/vmd

override_dh_auto_install:
	$(MAKE) -C src install
	cd debian/vmd && sed -i "s%`pwd`%%" usr/bin/vmd
	cd debian/vmd && sed -i "s%/bin/csh%/bin/tcsh%" usr/bin/vmd
	


More information about the Debichem-devel mailing list