Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new package bsdgames #6311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saltedcoffii
Copy link
Collaborator

Okay, I know I have a long history of trying to split up this package and get it added with all the games separately. It just wasn't worth the effort. Here's the whole package on one package file. Works on x86_64.

system "echo bsd_games_cfg_dm_nogamesfile='#{CREW_PREFIX}/etc/dm/nogames' | tee -a config.params"
system "echo bsd_games_cfg_hangman_wordsfile='#{CREW_PREFIX}/share/dict/words' | tee -a config.params"
system "echo bsd_games_cfg_wtf_acronymfile='#{CREW_PREFIX}/share/misc/acryonyms' | tee -a config.params"
system "echo bsd_games_cfg_ncurses_lib='$(pkg-config --libs-only-l ncurses)' | tee -a config.params" # Fix ncurses support
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write to a variable instead?

  config_params = <<~EOF     
  bsd_games_cfg_build_dirs="#{@bsdgames}"                                    
  bsd_games_cfg_docdir="#{CREW_PREFIX}/share/doc/bsdgames"
  EOF
  IO.write('config.params', config_params)                                                                                                                                                           

Then you don't need all the escapes and redundant system "echo ... | tee -a config.params" lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't know why I didn't think of that 🧠

def self.prebuild
puts 'Configuring'.lightblue
system "sed -i 's:-g -O2::g' configure"
system "sed -i 's:/usr/games:#{CREW_PREFIX}/bin:' wargames/wargames"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the sed lines to def self.patch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay :)

@saltedcoffii
Copy link
Collaborator Author

As soon as I started messing around with the package file, I started getting the weirdest errors, some of them preprocessor errors, others collect2 (linker) errors, etc. I worked so hard to get it to work that, if this is okay with you, I'd like to leave it like this.

@uberhacker
Copy link
Collaborator

Keep working at it. You will solve it eventually.

@uberhacker uberhacker added the hacktoberfest 🎃 Issues that, if fixed, is valid for entry in the hacktoberfest competition label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest 🎃 Issues that, if fixed, is valid for entry in the hacktoberfest competition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants