Name: dyncall Group: System/Libraries License: MIT Release: 0 Summary: Calling C functions dynamically URL: http://dyncall.org/ Version: 0.8 Source: %{name}-%{version}.tar.gz BuildRequires: cmake, gcc-c++ BuildRequires: texlive-a4wide, texlive-multirow, texlive-colortbl BuildRequires: texlive-rotating, texlive-moreverb, texlive-ncctools %define somajor 0 %description The dyncall library encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, the dyncall library provides a mechanism to push the function parameters manually and to issue the call afterwards. This means, that a program can determine at runtime what function to call, and what parameters to pass to it. The library is written in C and assembly and provides a very simple C interface to program against. %package -n %{name}%{somajor} Summary: Calling C functions dynamically Group: System/Libraries %description -n %{name}%{somajor} The dyncall library encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, the dyncall library provides a mechanism to push the function parameters manually and to issue the call afterwards. This means, that a program can determine at runtime what function to call, and what parameters to pass to it. The library is written in C and assembly and provides a very simple C interface to program against. %package devel Summary: Development files for dyncall Group: Development/Libraries/C and C++ Requires: %{name}%{somajor} = %{version} %description devel Development files for dyncall The dyncall library encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, the dyncall library provides a mechanism to push the function parameters manually and to issue the call afterwards. This means, that a program can determine at runtime what function to call, and what parameters to pass to it. The library is written in C and assembly and provides a very simple C interface to program against. %package doc Summary: Documentation files for dyncall Group: Documentation/Other BuildArch: noarch %description doc Documentation files for dyncall The dyncall library encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, the dyncall library provides a mechanism to push the function parameters manually and to issue the call afterwards. This means, that a program can determine at runtime what function to call, and what parameters to pass to it. The library is written in C and assembly and provides a very simple C interface to program against. %prep %setup -q %build cmake \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DCMAKE_C_FLAGS="-fPIC %optflags" \ -DCMAKE_VERBOSE_MAKEFILE=ON perl -i -lpe 's|{CMAKE_INSTALL_PREFIX}/lib|{CMAKE_INSTALL_PREFIX}/%{_lib}|' \ dyncall/cmake_install.cmake \ dyncallback/cmake_install.cmake \ dynload/cmake_install.cmake %__make for i in dyncall dyncallback dynload ; do %__cc \ -fPIC %optflags \ -shared \ -o $i/lib${i}_s.so \ -Wl,--whole-archive,-soname,lib${i}_s.so.%{somajor} \ $i/lib${i}_s.a \ -Wl,-no-whole-archive done cd doc/manual pdflatex manual.tex %check cd test %__make all sh runalltests.sh %install %make_install for i in dyncall dyncallback dynload ; do install -t %{buildroot}%{_libdir} $i/lib${i}_s.so done %post -n %{name}%{somajor} -p /sbin/ldconfig %postun -n %{name}%{somajor} -p /sbin/ldconfig %files -n %{name}%{somajor} %defattr(-,root,root) %{_libdir}/libdyn*.so %files devel %defattr(-,root,root) %{_libdir}/libdyn*.a %{_includedir}/dyn*.h %files doc %defattr(-,root,root) %doc AUTHORS BUGS LICENSE README ToDo doc/manual/manual.pdf %changelog