DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Package System (pkgsrc)

NetBSD Package System (pkgsrc) Installation and upgrading of packages on NetBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th October 2015
in_the_void35 in_the_void35 is offline
Real Name: Craig Bushell
New User
 
Join Date: Oct 2015
Location: Canberra, Australia
Posts: 4
Question Obtaining Free Pascal library units and IDE not just compiler

Hello Forum,

Does pkgsrc include packages that simplifies all installation of the Free Pascal compiler, IDE and FCL units? Usually installing Lazarus on Linux takes care of all of this, but it installs Lazarus under X-Windows.
I gave this up on OpenBSD. There wasn't any documentation (only to FreeBSD) in the online Lazarus or FP manuals. It seems you have to replicate the directory structure of where those FCL units are on Linux or FreeBSD and copy them to OpenBSD. Then you have to point them to the compiler or set them up in the IDE. I'm not entirely sure how to do this. But I do have a computer IQ of 165 out of 200 so I'm pretty cluey.

Thankyou,
Craig

Last edited by in_the_void35; 16th October 2015 at 12:47 AM. Reason: Forgot question mark
Reply With Quote
  #2   (View Single Post)  
Old 16th October 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

Lazarus is at the moment absent in pkgsrc, I will have a look whether it's simply doable without need for knowing Pascal
Reply With Quote
  #3   (View Single Post)  
Old 16th October 2015
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 103
Default

I can't even find freepascal in pkgsrc and some posts on the mailing list say there are issues.
Reply With Quote
  #4   (View Single Post)  
Old 16th October 2015
in_the_void35 in_the_void35 is offline
Real Name: Craig Bushell
New User
 
Join Date: Oct 2015
Location: Canberra, Australia
Posts: 4
Default RE: Thanks people

Quote:
Originally Posted by darktrym View Post
I can't even find freepascal in pkgsrc and some posts on the mailing list say there are issues.
The compiler could be under the NetBSD equivalent of OpenBSD's lang/fpc. I had that installed under Geany in OpenBSD, but there were no units.
Reply With Quote
  #5   (View Single Post)  
Old 16th October 2015
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 103
Default

Nope, no FreePascal in Pkgsrc only GPC.
Reply With Quote
  #6   (View Single Post)  
Old 17th October 2015
in_the_void35 in_the_void35 is offline
Real Name: Craig Bushell
New User
 
Join Date: Oct 2015
Location: Canberra, Australia
Posts: 4
Question

GNU Pascal Compiler (GPC) will be fine.
Do I need to install gmake and gcc on vanilla NetBSD 7.0 first?

Will GPC (the non-minimal installation in pkgsrc) install all of the tools it describes on its website?

Once I install all of the libraries mentioned on the GPC website through pkgsrc, would they link up with the compiler in Geany when you create a .pas file? Do I just need to replace fpc in the build options with the path to gpc?
Reply With Quote
  #7   (View Single Post)  
Old 17th October 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

I've successfully installed Linux version and built a hello world example with fpc on NetBSD:

Quote:
program HelloWorld;
uses crt;

(* Here the main program block starts *)
begin
writeln('Hello, World!');
readkey;
end.
I prepared a suse 13.1 package, generated object file, manually fixed paths in the result file for a linker and it worked.

If someone will need it, I will help with NetBSD and pkgsrc, I don't know Pascal.


To get to my point:
1. Locally alter emulators/suse131_linux/Makefile.common

Quote:
Index: suse131_linux/Makefile.common
================================================== =================
RCS file: /cvsroot/pkgsrc/emulators/suse131_linux/Makefile.common,v
retrieving revision 1.13
diff -u -r1.13 Makefile.common
--- suse131_linux/Makefile.common 10 Mar 2015 01:42:13 -0000 1.13
+++ suse131_linux/Makefile.common 17 Oct 2015 13:35:48 -0000
@@ -73,6 +73,7 @@

_SUSE_FTP_SUBDIR= distribution/${SUSE_VERSION}/repo/oss/suse/
_SUSE_FTP_SUBDIR_UPD= update/${SUSE_VERSION}/
+_SUSE_FTP_SUBDIR_EDU= repositories/Education/openSUSE_${SUSE_VERSION}/

MASTER_SITE_SUSE_${SUSE_VERSION}= \
http://download.opensuse.org/${_SUSE_FTP_SUBDIR}
@@ -80,6 +81,9 @@
MASTER_SITE_SUSE_${SUSE_VERSION}_UPD= \
http://download.opensuse.org/${_SUSE_FTP_SUBDIR_UPD}

+MASTER_SITE_SUSE_${SUSE_VERSION}_EDU= \
+ http://download.opensuse.org/${_SUSE_FTP_SUBDIR_EDU}
+
MASTER_SITES?= ${MASTER_SITE_SUSE_${SUSE_VERSION}}/${SUSE_ARCH}/
DIST_SUBDIR?= suse${SUSE_VERSION:S/.//}

@@ -132,10 +136,10 @@
${MASTER_SITE_SUSE_${SUSE_VERSION}}${distfile:E}/
. endfor
.endif
-.if defined(RPMUPDPKGS) && !empty(RPMUPDPKGS)
-. for distfile in ${RPMUPDPKGS}
+.if defined(RPMEDUPKGS) && !empty(RPMEDUPKGS)
+. for distfile in ${RPMEDUPKGS}
DISTFILES+= ${distfile}.rpm
SITES.${distfile:T:S/=/--/}.rpm?= \
- ${MASTER_SITE_SUSE_${SUSE_VERSION}_UPD}${distfile: E}/
+ ${MASTER_SITE_SUSE_${SUSE_VERSION}_EDU}${distfile: E}/
. endfor
.endif
2. Get pkgsrc-wip (https://pkgsrc.org/wip for details)

3. Install wip/suse131_fpc
Quote:
make install
4. Add to your PATH suse compat packages
Quote:
export PATH=$PATH:/usr/pkg/emul/linux/usr/bin/
5. Compile the test example
Quote:
$ fpc -s test.pas
Free Pascal Compiler version 2.6.4 [2014/05/07] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test.pas
Closing script ppas.sh
8 lines compiled, 0.1 sec
6. Fix linker paths
Quote:
sed -i 's!/usr/lib64/!/usr/pkg/emul/linux/usr/lib64/!' link.res
7. Link sources
Quote:
$ ./ppas.sh
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
8. Run
Quote:
$ ./test
Hello, World!
<enter pressed>
$

It's a good start for bootstrapping a native fpc NetBSD version.

Last edited by kamil; 17th October 2015 at 01:58 PM.
Reply With Quote
  #8   (View Single Post)  
Old 17th October 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

For gpc, just install pkgin and:

Quote:
pkgin install gpc
It will handle the dependencies.
Reply With Quote
  #9   (View Single Post)  
Old 17th October 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

To browse the file, please check http://pkgsrc.se/lang/gpc and check cvsweb -> PLIST and PLIST.netbsd
Reply With Quote
Old 18th October 2015
in_the_void35 in_the_void35 is offline
Real Name: Craig Bushell
New User
 
Join Date: Oct 2015
Location: Canberra, Australia
Posts: 4
Default

Thank you, I will check out your hard work. But I will probably try GPC first, since that is the most plausible.
Reply With Quote
Old 18th October 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

Thank you, I saw that people want to get some Pascal software on NetBSD, like http://sourceforge.net/p/transgui

Working on it is highly appreciated!
Reply With Quote
Old 3rd December 2015
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 103
Default

Is there a release of the new fpc 3.0 or lazarus in view? Unfortunateley i work for a company which uses products made by Delphi 3, 5 and XE7(and some ASP.NET projects). On sourceforge/fpc there are NetBSD binaries for at least 2.64 but no entry in pkgsrc.
Reply With Quote
Old 5th December 2015
kamil kamil is offline
Fdisk Soldier
 
Join Date: Mar 2015
Posts: 52
Default

Hi, I will have a look
__________________
the dogs bark, but the caravan goes on
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lazarus 1.0: free cross-platform Pascal IDE J65nko News 0 30th August 2012 10:22 PM
New version of Free Pascal, 2.6.0 J65nko News 0 11th January 2012 06:13 PM
Delphi or Object Pascal In OpenBSD? SunSpyda Programming 14 28th November 2009 11:21 AM
Obtaining multiple IPs from ISP via DHCP dextro General software and network 15 9th January 2009 02:36 AM
java compiler bsdnewbie999 OpenBSD Packages and Ports 8 9th August 2008 12:18 PM


All times are GMT. The time now is 03:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick